Skip to content

Smallest K-Length Subsequence With Occurrences of a Letter

A Hard coding interview problem in the Stack pattern.

Likely pattern

Stack

Defer work until a matching or smaller element appears.

Recognition cue: Matching brackets, nested structure, or the next greater / smaller element.

Learn first

Topics

  • String
  • Stack
  • Greedy
  • Monotonic Stack
  1. 1Hard
  2. 2Hard
  3. 3Hard
  4. 4Hard
  5. 5Hard
  6. 6Hard
  7. 7Hard
  8. 8Hard