Skip to main content

Timeline for "Open and closed doors" riddle

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Aug 28, 2014 at 12:40 comment added Anirban Nag 'tintinmj' Actually I just finished my answer and saw that 3 answers were being posted. So though it looks like a copy-paste answer but truly I didn't know about other answers.
Aug 28, 2014 at 11:55 comment added Simon Forsberg There's just something icky about writing boolean[] state = new boolean[totalDoors+1]; So much for the totalDoors variable. I understand that you try to avoid off-by-one errors here, but... is it worth it? Especially considering the solution by @Pimgd
Aug 28, 2014 at 11:49 comment added Pimgd You don't need the array anymore, at which point the code boils down to my solution.
Aug 28, 2014 at 11:14 history answered Anirban Nag 'tintinmj' CC BY-SA 3.0