LCS with 3 strings

In LCS with 3 strings I found out LCS of two strings then took LCS of ans and 3rd String still Showing Wrong Answer

https://online.codingblocks.com/app/player/161395/content/158328/5201/code-challenge

Hello @yashratnani6 Lcs with 3 strings is the question through which you can learn the concept od 3dimensional dp.
you have to think like 3dimensional approach.

I did 3D Dp but Showing Some Compilation Error like

18 Killed Code : https://ide.codingblocks.com/s/385280

Hey @yashratnani6 soe questions have perfect and particular technique to solve them.


please see this code and tell me if you dint understand anything.
Happy Learning!

But this logic Worked with 2 LCS problem and I modified it for 3 it is not working pls Debug my code

@yashratnani6 the code which i have shared is of 3d dp only .
how can you implement this logic in 2d dp ?
try submitting that 2d dp logic you will see that test cases will not pass.

you may have got the correct answer for any test case.
but you will not get for every test case.

No I modified 2D to 3D then also it is not working Pls First See the code

@yashratnani6 i have seen your code and i am not even getting what you are trying to do .

Pls Check my Code I am getting zero as answer https://ide.codingblocks.com/s/411294

Hey @yashratnani6

if(a[i]==b[j]&& b[j]==c[k]){

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.