Added shortest path algorithm.