AoC 2023, Day 5, Fertilizer
I am currently quite a few days behind. I will try catching up bit by bit.
My first attempt at the Day 5 puzzle, called If You Give A Seed A Fertilizer did not go so well, so this is my second attempt.
Part 1
I want to create a couple of types, a map entry type and a map type, this is to hold the input data.
Some of the numbers on the actual data are quite high, and there are no negatives, so I chose to use uint
values.
I need a few functions to parse the text into data types.
I want a function that will be able to lookup the destination from a map.
And another that will step through each map.
Putting this all together
Because 35
is the answer I am expecting, and my answer with the full puzzle text is also correct, I finally get another star.
Read other posts