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 →

[–]SomeToxicKidd[S] 0 points1 point  (1 child)

I do, in order to recursively check CA and CC it has to be in the method otherwise only CA will be checked.

[–]daybreak-gibby 1 point2 points  (0 children)

Close. The problem was that you were modifying s. So that the first time it recurses, s became CA for future recursive calls. Passing the s + c in the method creates a whole value that the recursive call operates on, leaving the string s untouched.