My code is not passing test cases can you check
@aasif2364 when you are using this approach there is a issue the ans might contai duplicate ans beacuse there can be multiple matches and we dont know which one we have to include our ans
for example
abc
bc
your ans will be 2 but your vector v will be cbc because c is matched 2 times
so dont use this approach for printing the lcs just calculate the dp and then use 2 while loop to print it
if you still have any issue feel free to ask and if clear please mark it as resolved and rate my experience
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.