1 Test case is not running .Please find error
Subsequence Recursion problem
Hey @sulbh579 the testcase is not working because your output of strings in not correctly sorted as per the requirements. If you observe closely though, the required order of output is the reverse of your initial vector v
before sorting as per your comp function.
So instead of doing the sorting do this
for (auto it = v.end()-1; ; --it){
cout << *it<<’ ';
if(it==v.begin()) break;
}
Now the code works fine but if you still have any further doubts, please feel free to ask;
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.