Issue in OJ's answer and "Run Code"


  • 0
    A

    If I use this input [1,3] and click on run code I get [1,null,3] from leetcode while if I submit solution, it gives the correct answer as just [3,1]

    Based on the run code solution I assumed that I must create a new node whose value is Null to make a balanced tree. However, I get a wrong answer as the expected answer by the judge is just [3,1]

    I am using python. If I do not add a new node with Null/None value to fill in to make it balanced my answer gets accepted.


Log in to reply
 

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