Shortest Path Problem Leetcode Python Compiler