LeetCode-Swift
LeetCode-Swift copied to clipboard
Space complexity of solution to Maximum Depth Of Binary Tree
The space complexity was specified as O(1) in the solution, however because of recursion, considering the stack, should it be O(n) instead?
@snapfinger Yes you are correct. Space complexity of the solution should be O(n). @soapyigu Should I raise the PR to fix this?