Leetcode 3302. Find the Lexicographically Smallest Valid Sequence | Hello Interview