Runtime Error In Leetcode Python Problems