Shortest Path Algorithm Leetcode Python Challenges