Subsequence problem doubt in code


this is my code where i am wrong pls explain me as my test cases are not passed

Hi @dipeshgupta197
ur logic is absolutely correct… only one small mistake the order of o/p is expected in reverse order than yours… so just swap the 2 recursive calls… take the bottom one recursive call above… ur code will give correct o/p and pass all test cases…
corrected code --> https://ide.codingblocks.com/s/640164

Hi @dipeshgupta197
I hope its clear now… shall I mark this doubt as resolved??

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.