Discussion thread for day 18 of the Advent of Code - https://adventofcode.com/2023/day/18
Well, my first thought was "this looks a lot like day 10", so started in with a spatial approach.
While this worked, it took about 2.5 minutes to run. I did learn fun things about generating integer points and getting them to intersect (have them come from the same stream of data!). But knew this wouldn't be scalable for part 2
Read through solution descriptions, and found the shoelace method.
Runs in 0.5 seconds
Part 1 : I use spatial tools.
Part 2 : The shoelace formula is needed.
Part 2, I use shoelace formula. But it can't be not applicable as is.
This is the final workflow.
I solved P1 and P2 without any hints. I learned the shoelace formula here. It is very smart.
@phottovy - Thanks for sharing. I was so close but forgot to add in the perimeter/steps around the outside - thank you as usual for unsticking me :)