Leetcode solutions in python