LCS with 3 Strings problem of DP section

https://ide.codingblocks.com/s/219476.
Is my approach incorrect?
It’s failing only one test case

@Naveen8377,
Your approach is incorrect, you are trying to find lcs of {lcs of a,b} and c. This is not correct always,
E.g,
sa=“abcde”
sb=“acebd”
sc=“bd”

Here lcs(sa,sb)=“ace”, lcs(lcs(sa,sb),sc)=""
But, lcs(sa,sb,sc)=“bd”

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.