Question 8929 – Graphs-and-Tree
May 15, 2024
Arrays
May 15, 2024
Question 8929 – Graphs-and-Tree
May 15, 2024
Arrays
May 15, 2024

Question 9524 – Linked-List

A circularly linked list is used to represent a Queue. A single variable p is used to access the Queue. To which node should p point such that both the operations enQueue and deQueue can be performed in constant time?

Correct Answer: A

Question 13 Explanation: 
We can perform enqueue and dequeue from rear within O(1) time. But from the front node we cannot rear from front in O(1) time.
A
rear node
B
front node
C
not possible with a single pointer
D
node next to front

Leave a Reply

Your email address will not be published. Required fields are marked *