Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Why is the space complexity for non memoized version 2^N? It appears to me that ...

SeungJin Kim

Jul 13, 2022

Why is the space complexity for non memoized version 2^N? It appears to me that the space required is used by the recursion call stack which is at most the depth of n - 1?

1

0

Comments
Comments
Z
zachery.pang 2 years ago

I agree, space should be O(N) for non-memoized version.

On this page