3 ms·
He has the classic "find a loop in a linked list" question here: http://www.mytechinterviews.com/loop-in-a-singly-linked-list http://www.mytechinterviews.com/l
by RiderOfGiraffes 17y ago
He has the classic "find a loop in a linked list" question here:
http://www.mytechinterviews.com/loop-in-a-singly-linked-list http://www.mytechinterviews.com/loop-in-a-singly-linked-list
He seems to think it's the end of the story when he trots out the usual "tortoise and hare" algorithm, without mentioning that it's more efficient to use a teleporting tortoise.