Why in interleaving strings question we are doing recursion?

we can do this by keeping 3 pointers and increasing according to match plz give some contrary examples

@kingshuk441,
Please provide a code for your logic.

@kingshuk441,
You code fails on,

 char ch[100]  = "aadb";
 char ch1[100] = "ad";
 char ch2[100] = "ab"; 

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

plz give what is the error in the code and why to use recursion

@kingshuk441,
I don’t think there’s error in code, error is in the logic. You can’t always greedily choose using pointers, and thus you need recursion, to check all valid possibilities, and choose the best one among them.