Solution of questions from LeetCode