Shortest Path Problem Leetcode Interview