Single Source Shortest Path Leetcode Javascript Interview