my solution
Did not use digraph
, i just traversed the tree of SAN for distances, and then found YOU’s intersection with it.
Add me as someone else who didn’t use digraph
and who just worked through lists (well maps) of planets. My solution is here.
Caught up partly today, my Day 6 video of using digraphs in Erlang:
Catching up with Gleam, also using digraph
: https://github.com/michallepicki/adventofcode/blob/master/2019/gleam/src/universal_orbit_map.gleam
edit: First time using digraph
so I didn’t know get_short_path
exists and implemented my own silly search
Thank you everyone here, this is my first time to understand algorithm about graph. And I am amazing about erlang’s standard documentation.
Some great solutions here!
I didn’t know of digraph, and also used the --/2
operator instead of sets (first time I’ve used it, it’s nice!).