LeetCode solutions in Python