Answers for questions from LeetCode and other sources.