If input root is null. What is the right answer?
By the way my solution has passed tests.
Please read the problem carefully, in note 2, it says The given binary tree has at least one tree node.
The given binary tree has at least one tree node.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.