Data Structure MCQ – Stack using Queues
1. To implement a stack using queue(with only enqueue and dequeue operations), how many queues will you need?a) 1b) 2c) […]
1. To implement a stack using queue(with only enqueue and dequeue operations), how many queues will you need?a) 1b) 2c) […]
1. A Double-ended queue supports operations such as adding and removing items from both the sides of the queue. They
1. What is a dequeue?a) A queue with insert/delete defined for both front and rear ends of the queueb) A
1. With what data structure can a priority queue be implemented?a) Arrayb) Listc) Heapd) TreeAnswer: cExplanation: A priority queue can
1. In linked list implementation of queue, if only front pointer is maintained, which of the following operation take worst
1. Which of the following properties is associated with a queue?a) First In Last Outb) First In First Out and
1. What is the best case time complexity of deleting a node in a Singly Linked list?a) O (n)b) O
1. Which of the following real world scenarios would you associate with a stack data structure?a) piling up of chairs
1. What differentiates a circular linked list from a normal linked list?a) You cannot have the ‘next’ pointer point to
1. Which of the following is false about a doubly linked list?a) We can navigate in both the directionsb) It