find some error???

  • 0

    the data i use is [3,9,20,null,15,null,12,15,7]
    and I think the correct answer shoud be 24
    why it tell me 15???
    you can try it

  • 0

    The answer is 15. Because 15 is only left leaf. While 9 is left child, it is not leaf, since it has right child.

Log in to reply

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