I went with a matrix approach and was just planning to handle it through indexes but kinda gave up halfway implementing the finding of numbers, their start/end positions… I’m guessing a regex but that might have issues if we have identical numbers later, so not sure. Will surely go back to it eventually though :P
I have a Grid class from previous years so I sort of fell into that approach too. Once you’ve got the groundwork into place the solution is not so hard to get to. Hopefully I won’t have to think so hard tomorrow!
I went with a matrix approach and was just planning to handle it through indexes but kinda gave up halfway implementing the finding of numbers, their start/end positions… I’m guessing a regex but that might have issues if we have identical numbers later, so not sure. Will surely go back to it eventually though :P
I have a Grid class from previous years so I sort of fell into that approach too. Once you’ve got the groundwork into place the solution is not so hard to get to. Hopefully I won’t have to think so hard tomorrow!
Having a prepared grid helper for AoC is a 150IQ move 😁
Haha yes, I copied the idea from the 150IQ people.