We implement a queue using a circular linked list where front is the pointer to the front node
Answers
Answered by
6
GATE 2004) circularLinkedList. (A) rear node (B) front node (C) not possible with a single pointer ... p is rear we can implement both enQueue and deQueue in O(1) because from rear we can get front ...
Answered by
0
Implement the pointer to the Rear position
Explanation:
- To insert a node during a circular list at rear position it ought to be inserted at rear position.
- Circular joined list may be a joined list wherever all nodes are connected to make a circle.
- There is no null at the top. A circular joined list is one by one circular joined list or doubly circular joined list.
- We don't have to be compelled to maintain 2 pointers for front and rear if we have a tendency to use circular joined list .
- We will maintain a pointer to the last inserted node and front can continuously be obtained as next of last.
- In circular joined list we will insert parts anyplace within the list Consider, the
Output:
Elements in circular queue: 14 22 6
Deleted value: 14
Deleted value : 22
Elements in Circular Queue are: 6
Elements in Circular Queue are: 6 9 20
#SPJ3
Similar questions