Shortest Path Problem Leetcode 759