Thumb UP. Thank you for the clear explanation and process of thoughts.
I think for the recursive space, Should it be O(depth of tree) than O(logN) since it's random binary tree?
Binary Tree Upside Down
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.