Leetcode 3106. Lexicographically Smallest String After Operations With Constraint
Given a string s and a budget k, find the lexicographically smallest string t you can form by changing characters where each character change costs the cyclic distance on the alphabet and the total cost must be ≤ k. The core challenge is allocating the additive per-character cyclic-change budget to pick the smallest possible letters (often via a greedy per-position decision) while respecting the total cost constraint.
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.