list icon indicating copy to clipboard operation
list copied to clipboard

Detecting loops in linked lists

Open humanshell opened this issue 11 years ago • 1 comments

I came across this really interesting article in my reader a while back and just got around to clearing it out of my Safari reading list:

http://coryg89.github.io/technical/2013/12/12/the-tortoise-and-the-hare-loops-in-linked-lists/

I thought the function might be a good candidate for inclusion in this library. If you agree, let me know and I'll create a pull request with the new function and a test for it.

humanshell avatar Dec 27 '13 17:12 humanshell

Wouldn't hurt but IMO, if you've got loops in your lists, you're probably doing something wrong.

stephenmathieson avatar Feb 09 '14 20:02 stephenmathieson