leetcode leetcode practice For every problem, the first function is my version. The second one is a solution better than mine.