solve 3 problems at leetcode