Solve: Count Matching Neighbors
Created By: Chris Taylor
/ Version: 2023.7.0
Complete the following recursive method that returns a count of
how many characters have neighboring characters that match. For
example, "ama" here "m" has matching neighbors since they are
both "a".
For this problem we're expecting only a method.
Don't define a class, include modifiers like static or public, add import statements, or add code outside the method declaration.int countMatchingNeighbors(String phrase) {
return 0;
}