Leetcode written in Python