Finish leetcode_2114.