Tag Archives: Data Structures-Queue

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
Prerequisite – FIFO (First-In-First-Out) approach in Programming FIFO is an abbreviation for first in, first out. It is a method for handling data structures where… Read More
Consider the following pseudo code. Assume that IntQueue is an integer queue. What does the function fun do? filter_none edit close play_arrow link brightness_4 code… Read More
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter. MultiDequeue(Q){ m = k while (Q is… Read More
An implementation of a queue Q, using two stacks S1 and S2, is given below: filter_none edit close play_arrow link brightness_4 code void insert(Q, x)… Read More
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3,… Read More
Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation… Read More
Which of the following is true about linked list implementation of queue? (A) In push operation, if new nodes are inserted at the beginning of… Read More
A priority queue can efficiently implemented using which of the following data structures? Assume that the number of insert and peek (operation to see the… Read More
How many queues are needed to implement a stack. Consider the situation where no other data structure like arrays, linked list is available to you.… Read More
How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.… Read More
Which one of the following is an application of Queue Data Structure? (A) When a resource is shared among multiple consumers. (B) When data is… Read More
Following is C like pseudo code of a function that takes a Queue as an argument, and uses a stack S to do processing. filter_none… Read More