Programming, Algorithms, Data Structures, Coding Interviews, Data.
top-down approach is recursive, so recursion will use a call stack. The space complexity of the top-down approach = O(size of the call stack) + O(extra space to store subproblem solutions). In most cases, the extra space required for storing subproblem solutions will dominate the space complexity.