Trees: Is This a Binary Search Tree?

  • [deleted]Challenge Author
    + 0 comments

    n == null will check if its parent is a leaf node or not (since leaf node has no child, if you reach the leaf node, the child node will be Null, hence default return True)