Search code examples
data-structureslinked-listcircular-list

linkedlist which links to itself?


Is there a name for a linked list type structure where the head and tail nodes link to each other? In such a list you can obviously iterate through it forever as it double backs on itself.


Solution

  • Yes, it's called a circular list.

    (Anders Hejlsberg's favorite data structure is a circular linked list)