I have this two strings:
afgheeeqwaa
a,e
I need to compare them and tell how many times the letter A
appears in groups of 2 and how many times it appears in groups of 3. Same goes for the letter e
.
I'm doing this in objective-C and I just started learning it. I'm thinking I should make a loop for the second string that checks letter by letter if they match to the first one. But what do i need to do next to make my little program count the groups?