Print Alternating Characters From Two Strings (Interleaving) Using Recursion Java
Posted
by babi2balla
on Stack Overflow
See other posts from Stack Overflow
or by babi2balla
Published on 2009-11-13T03:09:04Z
Indexed on
2010/04/22
8:13 UTC
Read the original article
Hit count: 310
I'm trying to write a method that uses recursion to print the string formed by "interleaving" the strings str1 and str2. In other words, it should alternate characters from the two strings: the first character from str1, followed by the first character from str2, followed by the second character from str1, followed by the second character from str2, etc.
How would I go about this? Any ideas are greatly appreciated!! Thanks
© Stack Overflow or respective owner