Finish leetcode_534.