Question: Consider, a singly circular linked list is used to represent a Queue. There is only one p variable to access the queue. To which node

Consider, a singly circular linked list is used to represent a Queue. There is only one p variable to access the queue. To which node should p point such that both the operations enQueue and deQueue can be performed in constant time? (GATE 2004)

Front P ? Rear

A. rear node 

B. front node 

C. not possible with a single pointer 

D. node next to front

Front P ? Rear

Step by Step Solution

3.39 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A Explanation A From rear node we can get f... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Data Structures and Other Objects Using Java Questions!