結果 : shortest path algorithm using dynamic programming