Hey there and welcome back.
So we have discussed the approach that can be taken to implement the bottom up or tabulation approach
for solving the LCS question.
Let's now discuss the space and time complexity of this approach.
Now the space complexity is obvious.
It's going to be of the order of M into N, because we have this DP table over here and it has almost
m columns and n rows.
So the space complexity is of the order of m into n.
Now what about the time complexity?
The time complexity also is going to be of the order of m into n, because we need to iterate over all
these cells till we find the value for this cell, which will give us the answer for the question.
So the time complexity is also of the order of m into n, because notice over here we have m into n
cells over here to fill.