python solution to leetcode problems