John Regehr on Nostr: he built part 1 from a shortest path code he had sitting around from some class, so ...
he built part 1 from a shortest path code he had sitting around from some class, so for part 2 he just ran it in both directions from every grid point