LeetCode problems in Python