|
-
March 28th, 2011, 02:20 PM
#1
All combinations of inserting spaces into String
Hey guys!
If i have for example the string "abcde" and i want to return all the String possibiliets resulted in inserting k spaces ( " " ), what would be a correct approach? Ex:
k=0
abcde
k=1
a bcde
ab cde
abc de
abcd e
k=2
a b cde
a bc de
a bcd e
ab c de
.....
k = length("abcde")-1
a b c d e
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|