Why test cases are failing
Recursion-Subsequences
Hey @Ans
In line 15 of your code, you were doing
int a = getSubSeq(str.substring(1), str.charAt(0)+ans);
This was giving output as dcba instead of abcd
int a = getSubSeq(str.substring(1), ans+str.charAt(0));
Put ans before str.charAt(0). Try this.
I did that, again the test case are failing.
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.