Implement Shortest Path Leetcode Sql Problems