Confused about empty tree case.


  • 0
    K

    If input root is null. What is the right answer?
    By the way my solution has passed tests.

    0_1497786416832_Screenshot from 2017-06-18 14:38:37.png


  • 1

    Please read the problem carefully, in note 2, it says The given binary tree has at least one tree node.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.