Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I was having a hard time figuring out day 12 of Advent of Code. In the end I gave up and went looking for some solutions. I came across this one and this one. However, I didn't quite understand what they did.
I was having a hard time figuring out day 12 of Advent of Code. In the end I gave up and went looking for some solutions. I came across this one and this one. However, I didn't quite understand what they did.
Then I came across this Python solution, which was quite short and concise. So I implemented this solution in F#, but I had to use a mutable. I couldn't figure out how to get rid of this mutable. Is there a way, or is this solution not a F# one?
Then I came across this Python solution, which was quite short and concise. So I implemented this solution in F#, but I had to use a mutable. I couldn't figure out how to get rid of this mutable. Is there a way, or is this solution not a F# one?
I am quite happy with my solution, even if I build all the actual paths. I thought they might be needed :P
I think my solution should be easy to understand - (you can ignore the getEdges for now, it's just a function that generates a Map of -> )
And if you want another solution to look at https://github.com/ajeckmans/AOC2021/blob/master/Puzzles/day12.fs
https://github.com/elken/AdventOfCode/blob/master/fsharp/2021/Day12/Main.fsx is what I got