Timeline for 100-doors puzzle
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 13, 2019 at 15:50 | comment | added | SylvainD | @AJNeufeld The argument n is unused because I've covered the case where "n gets big enough" and I plan to let OP perform the adaptation for other values of n based on the insight provided. As for the other point, good catch. I'll need to update my answer asap (but the idea is worth more than the actual code using it) | |
Jun 13, 2019 at 13:56 | comment | added | AJNeufeld |
Bugs in your rewrite: you loop starting at 0, and set doors[i*i-1] , or doors[-1] (the last door), to True . And the argument n is unused.
|
|
Jun 13, 2019 at 13:22 | comment | added | MrJoe |
I like the pretty_print_doors function. Certainly makes the output easier to read. I was keen to keep the function completely generalisable for any value of n , however small. Thanks though for your insight
|
|
Jun 13, 2019 at 13:17 | history | answered | SylvainD | CC BY-SA 4.0 |