Search
⌘K
Get Premium
Leetcode 1576. Replace All ?'s to Avoid Consecutive Repeating Characters
Replace each '?' in a lowercase string with a lowercase letter so that no two adjacent characters are equal, without changing the given letters. The problem reduces to making local choices per '?' (avoid its immediate neighbors), and a valid solution is always guaranteed.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.