4 ms·
This reminds me of a very poor interview question I asked a couple of times (and then never asked again because it is a terrible, terrible, interview question).
by CodeIsTheEnd 5y ago
This reminds me of a very poor interview question I asked a couple of times (and then never asked again because it is a terrible, terrible, interview question).
The snake cube puzzle [1] is a puzzle where you have to fold up a string of 27 cubes, with fixed "turns" like the shapes in the OP, into a 3x3x3 grid.
The goal was not to find a solution to the puzzle, but to find the smallest 2d area the snake could fit into without folding against itself. It turned into a modeling problem (how do you represent the puzzle in code?) and a recursion problem (try all possible folds), but, uh, even with a physical puzzle to play with, it was a little too abstract
A commenter on the link below asked another question over 13 years ago: can the puzzle be folded into a plane without any holes? Obviously if you just lay out the puzzle from end to end it will be in a plane, and without any holes, so maybe the question should be: what is the smallest 2d area the snake can fit into without creating any holes?
[1]: https://mypuzzles.wordpress.com/2008/09/07/the-snake-cube/ https://mypuzzles.wordpress.com/2008/09/07/the-snake-cube/
- orthoxerox 5y ago27x1 would again be the smallest 2d area.