← 返回 salesforce 的题目列表Minimum Substitutions for No Adjacent Duplicate Characters
类型:online_judge
Given a list of words, for each word, 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. Provide one or more test cases to further explain.
Example
Input
3
aa
aabb
cc