Wrong test case?


  • 0
    S

    My BST output seems a little bit different than the expected result although my output should be also valid.

    Here is the test case:
    0_1482065872915_testcase.jpg

    This is expected result:
    0_1482065914659_expected.jpg

    This is my output:
    0_1482065927100_myoutput.jpg

    My result is a valid BST and should be accepted. Please correct me if I'm wrong.


  • 0

    @simonkey The data is too large to be displayed in the window (you should have seen a yellow alert text in the bottom right corner which is not included in your screenshot). So maybe the bottom row of nodes are not placed in the correct position.


  • 0
    S

    @1337c0d3r The data displayed is full (although there is an alert) and you can see the tree data is correct according to node's neighbors.
    Anyway I think my result should be accepted.


Log in to reply
 

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