My solution to the Questions in Leetcode