0
/ 20
We'll say that a "triple" in a string is a char appearing three times in a row. Return the number of triples in the given string. The...
We'll say that a "triple" in a string is a char appearing three times in a row. Return the number of triples in the given string. The triples may overlap.
Examples:
countTriple("abcXXXabc") -> 1
countTriple("xxxabyyyycd") -> 3
countTriple("a") -> 0
Your feedback will appear here when you check your answer.