MCQ - Queue in Data Structure

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 ?

A Queue
B Stack
C. Tree
D. Linked list

View Answer

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

A. Stack
B. Array
C. Queue
D. Tree

View Answer

13. A queue is a ?

A. FIFO (First In First Out) list
B. LIFO (Last In First Out) list
C. Ordered array
D. Linear tree

View Answer

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

A. Stack
B. Queue
C. Linked list
D. None of the mentioned

View Answer

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

A. Queue
B. Circular queue
C. Dequeue
D. Priority queue

View Answer

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

A. Rear = MAX_SIZE – 1
B Front = (rear + 1)mod MAX_SIZE
C. Front = rear + 1
D> Rear = front

View Answer

17. Queues serve major role in

A. Simulation of recursion
B. Simulation of arbitrary linked list
C. Simulation of limited resource allocation
D. All of the mentioned

View Answer

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

A. Ordinary queue
B. Single ended queue
C. Circular queue
D. Priority queue

View Answer

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

A. First In Last Out
B. First In First Out
C. Last In First Out
D. None of the mentioned

View Answer

20. What does the following piece of code do?

public Object function()
return -999;
Object high;
high = q[front];
return high;

A. Dequeue
B. Enqueue
C. Return the front element
D. None of the mentioned

View Answer

Also Check :


* You must be logged in to add comment.