leetcode 6, too many small errors