What I did in this question was , I took the LCS of the 1st 2 strings and stored it in another variable and took it’s LCS with the 3rd string. Then I just printed the length of the resultant string but I faced wrong answer error.
2D grid approach
@mananaroramail consider
str1 = “abcd1e2”
str2 = “bc12ea”
str3 = “bd1ea”
when u take lcs of str1 and str2 it is bc12
and then with str3 it is b1
however answer should be b1e