Hacker News new | ask | show | jobs
by vijayaggarwal 4372 days ago
> In a circular linked lists you can have easy access to end of the list.

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.