Getting MLE , i don't know why

Due to space used by call stack it is giving memory limit exceeded. Try to solve the problem in bottom up manner.

it is hard for me to write a 3d dp solution in bottom up , can you please help me out !!

Refer the following:

it is the solution of some different question , not of k ordered lcs , it is for lcs of 3 strings !!

It’s a k ordered lcs

but sir what is z here ??

Ooops!! sorry by mistake a different code link is sent, refer the following:

Sir, i can not figure out what it is and how it is ??? Can you please write a proper function with loop and base case . It might help .

@aryan_007
refer to this code

but my code is also same so why it is giving MLE

@aryan_007
my bad .refer to this

okayy yaa but still both of our codes are nearly same , so why is their a MLE in mine !!

@aryan_007
use int everywhere ,not long long

ye kya baat hoi :man_facepalming:

btw thanks , it got AC

1 Like