The code to solve the problems on LeetCode.