Why not level tree wrong answer??

  • -1

    I used Level tree..

    But 197/226 Passed

    why not pass this test case?

    OutPut : false
    Expected: true

    I think [1,2] not balanced tree.
    2 null

    why that test case balanced tree??

  • 0

    The height difference in height between left node (2) and non-existent right node of the root node (1) is 1. Hence by problem definition the tree balanced.

Log in to reply

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