I keep getting the reverse output in Print LCS

Here’s my code = https://ide.codingblocks.com/s/242926

@lousybrick,
https://ide.codingblocks.com/s/243149 corrected code. Use a char array to store your answer. And add elements from the last position. Do not append the characters

1 Like

Thank you, while compiling the code its giving me a right answer but when i submitted it shows as wrong answer.

@lousybrick,

The code is correct. I have checked all the testcases. It a technical glitch. Should be resolved soon. Try submitting your code later. If you still face any problem. Let me know.

Sure. Thank you so much!

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.