Implement Shortest Path Leetcode 75