Print string in lcs

answer link:https://ide.codingblocks.com/s/50868
question link:https://hack.codingblocks.com/contests/c/526/277?_ga=2.103195008.1840443150.1548239118-665357574.1546102235

The answers are coming correct on checking on custom input but it is showing wrong answer.

Hey @Vidushi04
Your code is very well written and the logic is perfectly right.
But this question can have two correct answers corresponding to various test cases like:

Input:
abc
acb

Output:
Both “ac” and “ab” can be the answers here depending on the logic used in the code.

It’s just that at backend user input is matched with a standard file.
So just interchanging str1 and str2 in line 43 and 44 of your code, would fetch you correct output. I’ve made this change in your code. https://ide.codingblocks.com/s/51699
Hope you understand :grinning:

thank you so much sir