Most solution use stack to record the middle point.
But it will take log(n) space to store the middle point until you reach the deepest left node.
Why it is O(1) space???
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.