Greedy algorithm for single source point shortest path