Complete leetcode 2121.