Hey everyone,
This is an assignment that I had last semester when I took my advanced programming class, but I was unable to figure it out. I stumbled across it this morning and was wondering if someone can give me some input on what's going wrong.
We were supposed to used a recursive method to generate all possible substrings of a given
string without repeats.
Here's the code:
If I pass in cat into my program I get:
cat
ca
c
a
at
a
t
I'm not really sure where the repeated a is coming from.
Thanks in advance,
Hunter.