Problem 2030 · Hard

Smallest K-Length Subsequence With Occurrences of a Letter

Find the lexicographically smallest length-k subsequence containing enough copies of a required letter.

Open the interactive visualisation