Hey, I'm trying to write a function that uses recursion to count the number of w characters within a group in an array.
wbbwwbww
bbbbwbww
wwwbbwww
wbwbwwbb
wbwwwbwb
wbbbbwww
wbwbbwww
wbwbbwww
For the first group, there is only 1, the second has 3, and etc. I've made a few attempts that either cannot count all of the characters, count the same area twice, or run an infinite loop.
Any help is appreciated.