Problem 3106 · Medium

Lexicographically Smallest String After Operations With Constraint

Move letters around the alphabet within a total budget, taking the smallest letter each position can afford.

Open the interactive visualisation