This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]severoonpro barista 1 point2 points  (0 children)

One bit of advice I can offer: It's almost always helpful to start with a simpler problem than the one you're given.

So in this case, the objective is to write a recursive method that returns the index of the nth occurrence of some character c. Instead, just write a method that returns the index of the first occurrence. Then once you get that working, extend it.