Given a linked list, determine if it has a cycle in it.
Follow up: Can you solve it without using extra space?
http://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm#Tortoise_and_hare
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Given a linked list, determine if it has a cycle in it.
Follow up: Can you solve it without using extra space?
http://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm#Tortoise_and_hare