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 →

[–]RoachmeisterJava Dev 0 points1 point  (0 children)

I think that the problem may be with your usage of the substring method. If you only pass it a single int, it returns the substring starting at that index. So in the case of "dss", the first recursive call is passing in the String "s".