Rosetta Problems

Find the Lexicographically Smallest Valid Sequence

https://leetcode.com/problems/find-the-lexicographically-smallest-valid-sequence