Leetcode 1737. Change Minimum Characters to Satisfy One of Three Conditions
Given two lowercase strings, find the minimum single-character edits to either make every letter in a strictly less than every letter in b (or vice versa), or make both strings consist of a single repeated letter; this is solved efficiently by using frequency counts and prefix sums over the 26 letters to evaluate all split points and uniform-letter options.
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.