solve some trivial problems on leetcode