Inserting null into a binary search tree

Viewed 897

Where does null get inserted into a binary search tree?

This problem is an example input for a problem on leetcode.

Input: root = [10,5,15,3,7,null,18]

If I follow a BST insertion algorithm, what do I do with that null there? Where does it end up as a node in the tree?

1 Answers
Related