Link Details

Link 12871 thumbnail
User 216300 avatar

By lpasqualis
via codingaway.com
Published: Feb 06 2007 / 03:13

This article describes how to find out if a linked list has a loop. The presented "Turtle and Rabbit" algorithm uses two runners, a turtle and a rabbit, in a competition that ends only when the list is found to have or not have a loop.
  • 8
  • 0
  • 865
  • 177

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (8)



Voters Against This Link (0)