Recursive String Function (Java)
- by Jake Brooks
Hi,
I am trying to design a function that essentially does as follows:
String s = "BLAH";
store the following to an array:
blah
lah
bah
blh
bla
bl
ba
bh
ah
al
So basically what I did there was subtract each letter from it one at a time. Then subtract a combination of two letters at a time, until there's 2 characters remaining. Store each of these generations in an array.
Hopefully this makes sense,
Jake