answersLogoWhite

0


Best Answer

best example is trains...where each coach is connected to next coach except the engine and the last coach..when we need to add a coach we need to move to the right position and adjust the connecting point suitably!!

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

The main application is when working with queues. Normally, you need to maintain links to both the head and tail because insertions occur at the tail and extractions at the head. With a circular linked list, you need only maintain a link to the tail because the tail points forwards to the head, thus providing constant time access to both through a single reference rather than two references, reducing memory consumption when dealing with many queues.

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

A singly-linked list allows constant-time access to the head of the list, so it is a reasonably efficient method of implementing a stack. The memory overhead is just one pointer per node in order to maintain the links between the nodes. However, if the list were implemented as a circular list, we would gain constant-time access to both the head and tail of the list at no additional cost. The only difference is that we need to keep track of the tail node rather than the head node (the tail points "forward" to the head so we get constant-time access to both nodes through a single pointer). In so doing, a singly-linked list can be used to implement reasonably efficient queues and deques (double-ended queues).

Circular lists are also used in "Round Robin" algorithms. For instance, in turn-based gaming, all the players are placed in a circular list and we simply traverse the list in an infinite loop until the game is over.

Doubly-linked lists can also be circular, however we only use these when we require bi-directional traversal. In most cases we do not. The "dancing links" (DLX) implementation of Donald Knuth's Algorithm X is one of the few exceptions, making use of circular doubly-linked lists in order to construct a sparse matrix that resembles a Torus (a ring-doughnut shape). Indeed, the nodes in the DLX algorithm actually have 4 links because each node is a member of two circular lists: one vertical and one horizontal.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the Circular singly linked list applications in real life?
Write your answer...
Submit
Still have questions?
magnify glass
imp