Back to course home
0% completed
Vote For New Content
Space Complexity Worst Case
Max Boykin
Oct 2, 2023
If the tree is unbalanced, couldn't the space complexity still be O(N^2)? If the tree is balanced each path would have O(logN) nodes in the path but if its a linked list, it would have N nodes in the path.
1
0
Comments
Comments
On this page