My solution to questions on LeetCode