Dynamic problem edit distance problem


i have started from first to last rather than last to first.

Hi @Krishna-Singh-2678805765519156
It totally depends upon you in which way to want to solve the question either starting from first or from last.
Your seems to be fine as i have tried many test cases and it gave correct output.

on running for large test cases it takes lot of time
also the memo table prints garbage vlaues

It is taking lots of time for large test case because there are many overlapping sub problems and each call is further making three recursive call each. So to reduce the time you have to use bottom up DP so that time complexity will become O(m*n).