Re:Seven Puzzles You Think You Must Not Have Heard Correctly...
by CamperBob2 on Saturday May 05, 2018 @10:45PM
(#17005010)
But what if your name is in box #51, which you aren't allowed to open?
Re:Seven Puzzles You Think You Must Not Have Heard Correctly...
by bewaretheirs on Saturday May 05, 2018 @11:16PM
(#17005069)
Then there's a cycle of length > 50 and everyone loses.
Re:Seven Puzzles You Think You Must Not Have Heard Correctly...
by function_seven on Sunday May 06, 2018 @01:11AM
(#17005314)
Like sibling says, this only happens when there’s a cycle longer than 50. In that case, you’re all doomed.
You have to find your pointer in a circular linked list. But it’s only singly-linked, so you start just in front of it and work around the links the long way. 30% of the time, all the lists are 50 elements or shorter, meaning everyone is guaranteed to succeed.