[lib] Extract Dijkstra algorithm to lib