Finish leetcode_71.