Search
⌘K

Leetcode 3441. Minimum Cost Good Caption

Given a string where each character can be shifted left/right in the alphabet at unit cost, compute the minimum total shifts to make every letter occur in contiguous groups of length at least three, and return the lexicographically smallest resulting string among all minimum-cost solutions (or "" if impossible).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.