Category Archives: Queue

Deque is a type of queue in which insert and deletion can be performed from either front or rear. It does not follow the FIFOâ€¦ Read More
Circular Queue is a linear data structure that follows FIFO (first in first out) principle which means the item that is inserted first in theâ€¦ Read More
A Queue is a linear data structure. This data structure follows a particular order in which the operations are performed. The order is First Inâ€¦ Read More
Geek is in a maze of size N * M. Each cell in the maze is made of either ‘.’ or ‘#’. An empty cellâ€¦ Read More
Given a stack of M elements and a queue of N elements in sorted order. The task is to find out the common elements ofâ€¦ Read More
Given a connected acyclic graph with N nodes numbered from 1 to N and N-1 edges, find out the pair of nodes that are atâ€¦ Read More
Given a stack St of M elements and a queue Q of N elements. The task is to put every element of stack into theâ€¦ Read More
The pushâ€“relabel algorithm (alternatively, pre flowâ€“push algorithm) is an algorithm for computing maximum flows in a flow network. Push-relabel algorithms work in a more localizedâ€¦ Read More
Given an array and a range [lowVal, highVal], partition the array around the range such that the array is divided into three parts.  All elementsâ€¦ Read More
Given a Binary Tree, the task is to find the difference of the sum of leaf nodes at the odd level and even level ofâ€¦ Read More
Pre-requisite: Maximum width of a Binary Tree with null value | Set 1 Given a Binary Tree consisting of N nodes, the task is toâ€¦ Read More
Given an array arr[] of N integers and an integer K, the task is to find the sum of maximum of the array possible whereinâ€¦ Read More
Given an array arr[] of size N, sorted based on the absolute value of its elements. The task is to sort this array based onâ€¦ Read More
Given a numeric string target of length N and a set of numeric strings blocked, each of length N, the task is to find theâ€¦ Read More
Given a numeric string target of length N and a set of numeric strings blocked, each of length N, the task is to find theâ€¦ Read More