Queue in Data Structure

@T-Bone

This question paper focuses on the "Queue" of Data Structure. These Multiple Choice Questions (mcq) should be practiced to improve the Data Structure skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

This question paper focuses on the "Queue" of Data Structure. These Multiple Choice Questions (mcq) should be practiced to improve the Data Structure skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

Questions

1. Which one of the following is an application of Queue Data Structure?

Mark the correct option

2. In linked list implementation of queue, if only front pointer is maintained, which of the following operation take worst case linear time?

Mark the correct option

3. Let the following circular queue can accommodate maximum six elements with the following data.What will happen after ADD O operation takes place? front = 2 rear = 4 queue = _______; L, M, N, ___, ___

Mark the correct option

4. 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.

Mark the correct option

5. In a Queue, if a user tries to remove an element from empty Queue it is called _________.

Mark the correct option

6. If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, in what order will they be removed?

Mark the correct option

7. priority queue can efficiently implemented using which of the following data structures? Assume that the number of insert and peek (operation to see the current highest priority item) and extraction (remove the highest priority item) operations are almost same

Mark the correct option

8. In case of insertion into a linked queue, a node borrowed from the __________ list is inserted in the queue.

Mark the correct option

9. If the MAX_SIZE is the size of the array used in the implementation of circular queue. How is rear manipulated while inserting an element in the queue?

Mark the correct option

10. Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are

Mark the correct option

11. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

Mark the correct option

12. The data structure required for Breadth First Traversal on a graph is?

Mark the correct option

13. A queue is a ?

Mark the correct option

14. In Breadth First Search of Graph, which of the following data structure is used?

Mark the correct option

15. A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?

Mark the correct option

16. A normal queue, if implemented using an array of size MAX_SIZE, gets full when

Mark the correct option

17. Queues serve major role in

Mark the correct option

18. Which of the following is not the type of queue?

Mark the correct option

19. Which of the following properties is associated with a queue?

Mark the correct option

20. What does the following piece of code do? public Object function() { if(isEmpty()) return -999; else { Object high; high = q[front]; return high; } }

Mark the correct option

Index of Questions