Kotlinlearncs.online LogoJava
Return to List

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".

int countMatchingNeighbors(String phrase) {
return 0; // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: