Implement Shortest Path Leetcode Sql Server