[LeetCode] Smallest K-Length Subsequence With Occurrences of a Letter

1 · · March 8, 2022, 1:53 p.m.
2030. Smallest K-Length Subsequence With Occurrences of a Letter You are given a string s, an integer k, a letter letter, and an integer repetition. Return the lexicographically smallest subsequence of s of length k that has the letter letter appear at least repetition times. The test cases are generated so that the letter appears in s at least repetition times. A subsequence is a string that can be derived from another string by deleting some or no characters without changing the order of the ...