Shortest Path Problem Leetcode 75