advent_of_code_cli
advent_of_code_cli copied to clipboard
Duplicate input before solving
Duplicate the input before each call to the solver methods part_one
and part_two
. This ensures that changes to the input in part_one
do not affect the value of input
passed to part_two
. Since we know that input
will be an array of strings, a shallow copy is sufficient.