Python Problem Solving Leetcode Contest