Graph shortest paths problem solver implementation