Finish leetcode_229