advent_of_code_cli icon indicating copy to clipboard operation
advent_of_code_cli copied to clipboard

Duplicate input before solving

Open bradsokol opened this issue 1 year ago • 0 comments

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.

bradsokol avatar Dec 09 '23 16:12 bradsokol