q. can a queue be represented by circular linked


Q. Can a Queue be represented by circular linked list with only one pointer pointing to the tail of the queue? Substantiate your answer using an example.

Ans.

Yes a Queue can be represented by a circular linked list with only one pointer

pointing to the tail of the queue. for example:

Queue(Q)

 

10                           11                         12                 13

 

Q has a pointer pointing to the tail of 'Q'.

This pointer represents real of the Q and ptr->next is the front of Q.

 

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: q. can a queue be represented by circular linked
Reference No:- TGS0156784

Expected delivery within 24 Hours