LeetCode solutions using python