Shortest Path Problem Leetcode Python Easy Challenges