Implement Shortest Path Leetcode Sql Solutions Hackerrank