Why I am getting TLE in Edit Distance(CSES PROBLEM)?

Getting TLE for higher input. Why??

Problem link CSES - Edit Distance

Solution link https://cses.fi/paste/63b41f2f00ad9e5129a56b/

Try passing str1 and str2 by reference instead of by value.

1 Like

Thankyou!!

1 Like