What does input [1,null,3] mean?


  • 0
    A

    What does [1,null,3] input mean?

    does it mean
    1
    /
    null 3

    as input? Thanks


  • 0

    What is "1 / \ null 3"?


  • 0
    A

    the format messed up. I was gonna put in a tree illustration there. root is 1, left child is null, right child is 3


  • 0

    More like you messed up the format :-). You can mark stuff and click the {} button or just indent it enough to be displayed raw:

        1                     1
       / \      or rather      \
    null  3                     3
    

    And yes, I'm pretty sure that's what it means. Click "read more on how binary tree is serialized on OJ" here. Got that from this answer.


Log in to reply
 

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