linkedlist which links to itself?
-
07-07-2019 - |
Question
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)
OTHER TIPS
Generally known as a circular linked list
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow