educative.io

Time and Space Complexity of Top down solution?

Time and space complexity missing for top down approach and not sure how to calculate it compared to bottom up approach which is easier to calculate.

The space complexity of top-down approach is O(m * n * min(m * n)), but the time complexity is O(m * n) just like the bottom-up approach.


Course: Grokking Dynamic Programming Patterns for Coding Interviews - Learn Interactively
Lesson: Longest Common Substring - Grokking Dynamic Programming Patterns for Coding Interviews