Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
55
:
17
Back to Dashboard
[CodeSignal] Adjacent Character Removal
Easy
You have a word of length L made up only of lowercase English letters. A character at position i is called a conflict if it equals the character immediately before it (i.e., word[i] == word[i-1]).
In each repair step, you may replace any one character with any different lowercase letter. Find the minimum number of repair steps needed to produce a word with zero conflicts. ...