[DAY11]Alternating Characters

Sherlock Chiou
1 min readOct 14, 2019

--

Solution: By observing the string, we could notice that if the right neighbor of a character and the character are the same. Then we need to delete the right neighbor. So we only need to count the number of the characters that satisfy the condition discussed above.

--

--

Sherlock Chiou
Sherlock Chiou

Written by Sherlock Chiou

Be Effective and Optimize for Learning

No responses yet