Skip to content

Tag Archives: cpp-queue

A priority Queue is an abstract data type that resembles a queue, and each element has a corresponding priority value. Priority queues are built on… Read More
A Queue is a linear structure that follows a particular order in which the operations are performed. The order is First In First Out (FIFO).… Read More
Given two strings, text and pattern, of size N and M (N > M)respectively, the task is to print all occurrences of pattern in text. … Read More
Given an undirected graph consisting of N nodes and M edges, the task is to find the minimum length of the path from Node 1… Read More
Given an undirected and unweighted graph of N nodes and M edges, the task is to count the minimum length paths between node 1 to… Read More
Given a matrix mat[][] containing only of 0s and 1s, and an array queries[], the task is for each query, say k, is to find… Read More
Generating Random Unweighted Binary Tree: Since this is a tree, the test data generation plan is such that no cycle gets formed. The number of… Read More
Design a data structure that supports the following operations in queue efficiently: push__front(x): Insert an element at the front of the queue. push__middle(x): Inserts element… Read More
Linear Queue: A Linear Queue is generally referred to as Queue. It is a linear data structure that follows the FIFO (First In First Out)… Read More
Given an integer N denoting the number of connected cities ( numbered from 1 to N ) and a 2D array arr[][] consisting of pairs… Read More
Given an integer N which denotes the number of slots, and an array arr[] consisting of K integers in the range [1, N] . Each… Read More
Linear Queue: A Linear Queue is generally referred to as Queue. It is a linear data structure that follows the FIFO (First In First Out)… Read More
Given a positive integer N, representing the count of players playing the game and an array of strings arr[], consisting of the numeric strings made… Read More
Given a Binary Tree and an integer K, the task is to find the level of the Binary Tree with width K. If multiple levels… Read More