Advent of Code 2024 - Day 12

I appreciate the solutions others post, it’s helped me learn a lot :heart:

I used a recursive function to build a set of region positions, then iterated over individual fences, building up a map of %{fenceStart => fenceEnd, fenceEnd => fenceStart}.

Pattern matching on maps is really clean.

https://github.com/liamcmitchell/advent-of-code/blob/3145e87a67328dfed30606d963c8a62fb2fea7f9/2024/12/1.exs#L66-L92