Expand description
§Transparent Origami
There are 2 possible approaches to tracking the position of dots after each fold:
- A
HashSetthat will collapse duplicate entries - An array of sufficient dimensions to track every possible coordinate.
We will use both approaches for speed, the first in part one and the second in part two.
For part two we can determine the final size of the paper by taking the last x and y coordinates from the fold instructions. It’s then faster and more convenient to process each point completely and update the final location, than to step through intermediate folds.