What I did was I used the lcs to give me the length of longest common subsequence. Then answer was |a| + |b| - lcsLength It's not getting passed. What am I doing wrong? Any test case for this.
@dustin40472 ай бұрын
@@nikhilkatoch577 can u share me your code
@dustin40472 ай бұрын
@@nikhilkatoch577 what will be your answer for abcd bed I think it would be 4+3-2=5 but if we think the answer would be beabcd or abcded this will give length 6... answer is 6
@nikhilkatoch5772 ай бұрын
@@dustin4047 yup I guess... But is 5 gnna be the correct answer....