top | item 16989338

(no title)

martininmelb | 7 years ago

What does the prisoner do if she gets to, for example, box 40 and there is a 40 in the box?

[edit] I reread the explanation and get it now. Only 1 prisoner (40) will actually get to open box 40. I was trying to think of this from the point of view of implementing it in code. I guess the cycle stops when a prisoner finds their own number or reaches 50 attempts.

discuss

order

jakear|7 years ago

Why would they have gone to box 40 in the first place had they not gotten a number 40 from elsewhere?