Why does OJ force me to give solution in only one particular way ?

  • 0

    I am having trouble understanding what the question exactly asks. Should we swap parent and child too? As long as the output is a valid BST isn't that enough ?

    Here is what I get.
    Input: {0,1}
    Output: {0,#,1}
    Expected: {1,0}

Log in to reply

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