Leetcode in Python