Linked List Cycles
Learn how to find cycles in a Linked List. We'll cover two different methods.
Linked List Cycles
Instructions
Describe a function that can detect the presence of loops in a Linked List. Rather than writing an actual function, describe the strategy you would employ.
Input: Linked List
Output: Boolean
Hints
A Linked List is an ordered, linear structure, similar to an array. Instead of items being placed at indices, however, they are connected through a chain of references, with each item containing a reference to the next item.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.