# UGCNET-Dec2013-II: 22

1.5k views

If the queue is implemented with a linked list, keeping track of a front pointer, which of these pointers will change during an insertion into an non-empty queue?

1. Neither of the pointer change
2. Only front pointer changes
3. Only rear pointer changes
4. Both of the pointer changes

recategorized

In linked list implementation of a queue, the last inserted node is always pointed by 'rear' and the first node is always pointed by 'front'.

Example:-

In above example, the last inserted node is 50 and it is pointed by 'rear' and the first inserted node is 10 and it is pointed by 'front'. The order of elements inserted is 10, 15, 22 and 50.

Hence,Option(C)only rear pointer changes.

Reference:-http://btechsmartclass.com/DS/U2_T9.html

## Related questions

1
1.8k views
How many edges are there in a forest of t-trees containing a total of n vertices ? n + t n – t n ∗ t nt
1 vote
What is the value of the postfix expression a b c d + - * (where a=8, b=4, c=2 and d=5) $-\frac{3}{8}$ $-\frac{8}{3}$ 24 -24