Difficulty in understanding the solution

unable to visualise with 3d array solution

@mudit2jain
For better understanding with three strings,you need to have proper understanding of LCS of two Strings.
Assuming you are having above requirement,In this problem the difficult part is to imagine 3D matrix.
But if 2D matrix representation is clear,then just add another 1D array with every 2D Array.
For e.g:
Take out pen and paper and follow these:
1 Draw a simple (MxN) 2-D Array with str1 length ‘M’ and str2 length ‘N’.
2 Now,Consider str3 with length ‘k’.
3 Draw k (MxN) 2D-Array, just like above.
4 Consider k=5 for simplicity,we now have 5 (MxN) arrays.Moreover these 5 2D Arrays represents a 3D matrix in 3D,with dimensions M x N x k.
5 As we have rough sketch of 5 2D-arrays on pen.Now,Dry run your code over these 5 2D-Arrays,you will get the point.

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.