Solutions of the leetcode problems