I have tried removing substring function too, but in that case it gives TLE for 3 cases.
Sir, getting TLE in 4th testcase in Edit Distance
Also pass your strings as reference to the function.
1 Like
Passed all the cases.