Check graph reachability and find the shortest path using the Dijkstra method. If there are many starts and only one goal, the graph can be built on the opposite side of the graph, which saves cost because only one point needs to be searched from.
This page is auto-translated from /nishio/ゴールをスタートにする using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.