by vijayaggarwal · 12y ago · 0 comments
This is not true for circular linked lists in general. A few special cases where this is true:
1. If the list is doubly linked.
2. If the list maintains pointers to both head and tail nodes (trivial).
3. If the list maintains a single pointer but uses it to refer to the tail node instead of the head node. Head node can then be easily reached as tail->next.
Of course, data structures can be tweaked in innumerable ways to add special properties. So one cannot possibly list all ways of adding easy tail-node-access to circular linked lists.
No comments yet.