In the previous video, we have discussed the tabulation approach for solving the edit distance question.
Now let's take a look at the space and time complexity of the approach that we discussed.
So the time complexity is going to be of the order of n into m.
Because we would have to iterate over all of these cells to get the final answer over here.
So the time complexity is of the order of n into m.
Notice that there would be n into m cells over here.
Now what about the space complexity?
The space complexity of this solution is also of the order of n into M, because we need this 2D depee
table.
But then the advantage compared to the memoization approach is that we will not be using space on the
recursive call stack.