Finish leetcode_545.