Task changed from detecting a unique sequence of length 4 to a unique sequence of length 14.
Just had to change a single if-check from checking for uniqueness (and potentially returning the position) from 4 to 14.
Successfully finished puzzle 1 in Rust by keeping a queue (VecDeque) of the last 4 characters and a function that checks for duplicate characters on any queue.
Rust is kinda nice. At least helpful errors.
Just changed the instruction execution to run with a temporary crane stack.
First all crates are fetched from the source stack and put onto the crane stack.
Afterwards all crates on the crane stack are put onto the target stack.
Both operations use stacks and therefore result in a same-order movement in the end.
Successfully finished the stack and instruction parsing and execution in Rust.
Took a bit and I've discovered that VecDeque are just more handy than plain Vecs but it works.
Decided to use Rust for this and boy did it take hours...
It is a very simplistic program without any fancy whistles. But it runs and succeeded in the puzzle!
Successfully finished the second puzzle.
Took me a bit worrying what "and at most two of the Elves will be carrying any other item type" meant in the task text while my grouping loop was broken and skipping a rucksack every fourth rucksack while doing the group. Yikes.
Caught the error before trying a result though thanks to exceptions when things go wrong!
Successfully finished the second puzzle. The parsing changed so that the second column is not my answer but the intended result. I just quickly changed the file parser to replace the intended result with the fitting answer so that I need not touch the evaluation function.
Moved the previous parsing to parse_file_v1() for archiving purposes.
Successfully finished the first puzzle in which rock, paper scissor had to be evaluated into points and summed up. I wonder if there is a more elegant way of checking for wins vs losses.