# Category Archives: Queue

Given a stream of characters, find the first non-repeating character from the stream. You need to tell the first non-repeating character in O(1) time atâ€¦ Read More
There are two conventions to define the height of a Binary Tree  Number of nodes on the longest path from the root to the deepestâ€¦ Read More
Given Linked List Representation of Complete Binary Tree, construct the Binary tree. A complete binary tree can be represented in an array in the followingâ€¦ Read More
Given information about N petrol pumps (say arr[]) that are present in a circular path. The information consists of the distance of the next petrolâ€¦ Read More
Given a Queue data structure that supports standard operations like enqueue() and dequeue(). The task is to implement a Stack data structure using only instancesâ€¦ Read More
Given an array of non-negative integers. Find the largest multiple of 3 that can be formed from array elements. For example, if the input array isâ€¦ Read More
Given a Binary Tree, write a function to check whether the given Binary Tree is Complete Binary Tree or not.A complete binary tree is aâ€¦ Read More
The breadth-first search (BFS) algorithm is used to search a tree or graph data structure for a node that meets a set of criteria. Itâ€¦ Read More
Given an array and an integer K, find the maximum for each and every contiguous subarray of size K. Examples :  Input: arr[] = {1,â€¦ Read More
Introduction : A queue is a linear data structure that follows the “first-in, first-out” (FIFO) principle. It is a collection of elements that supports twoâ€¦ Read More
The problem is opposite of this post. We are given a stack data structure with push and pop operations, the task is to implement aâ€¦ Read More
Given a Binary Tree, the task is to print the Level order traversal of the Binary Tree in spiral form i.e, alternate order. Example: Input:Output:â€¦ Read More
Given the root of the Binary Tree. The task is to print the Level order traversal of a tree is breadth first traversal for theâ€¦ Read More