Leetcode 2030. Smallest K-Length Subsequence With Occurrences of a Letter
Find the lexicographically smallest subsequence of length k from s that contains at least repetition occurrences of a given letter. This requires a greedy, monotonic-stack-like selection that pops larger characters only when enough remaining characters (and required letters) remain to still build a valid subsequence.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.