Queue be represented by circular linked list, Data Structure & Algorithms

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.

 

 

Posted Date: 7/13/2012 1:16:23 AM | Location : United States







Related Discussions:- Queue be represented by circular linked list, Assignment Help, Ask Question on Queue be represented by circular linked list, Get Answer, Expert's Help, Queue be represented by circular linked list Discussions

Write discussion on Queue be represented by circular linked list
Your posts are moderated
Related Questions
Ask question #Minima binary search tree is used to locate the number 43 which of the following probe sequences are possible and which are not? explainum 100 words accepted#

The algorithm to delete any node having key from a binary search tree is not simple where as several cases has to be considered. If the node to be deleted contains no sons,

Normally a potential y satisfies y r = 0 and 0 ³ y w - c vw -y v . Given an integer K³0, define a K-potential to be an array y that satisfies yr = 0 and K ³ y w - c vw -y v

compare and contrast the bubble sort,quick sort,merge sort and radix sort

Determine the Disjoint of division method A polygon is disjoint from the viewport if the x- and y-extents of the polygon do not overlap the viewport anywhere. In this case; reg

nested for loop for (i = 0; i for (j = 0; j sequence of statements } } Here, we observe that, the outer loop executes n times. Every time the outer loop execute

AVL trees are applied into the given situations: There are few insertion & deletion operations Short search time is required Input data is sorted or nearly sorted

How to construct a data flow diagram for a college assignment and marking systemA


Area Subdivision Method In this method, the viewport is examined for clear decisions on the polygons situated in it, in regard to their overlap and visibility to the viewer. Fo