Recursive String Function (Java)

Posted by Jake Brooks on Stack Overflow See other posts from Stack Overflow or by Jake Brooks
Published on 2010-05-05T23:27:51Z Indexed on 2010/05/05 23:38 UTC
Read the original article Hit count: 483

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

© Stack Overflow or respective owner

Related posts about java

Related posts about string