No Pairs Allowed (Minimum Substitutions)

Asked at Palantir · Coding Questions · Difficulty: Easy

For each word in a list of words, if any two adjacent characters are equal, change one of them. Determine the minimum number of substitutions so the final string contains no adjacent equal characters.

Loading the problem…