solve several problems at leetcode