target data to search
Get first occurrence of node
Node in BST | Null if node not found
It find the node with the given data and if node doesn't exists it return the position where the node can be inserted.
target data to insert
Node in BST | Null if tree is empty
The reference node
The ancestor of a node with the next largest data | null if right ancestor doesn't exists
The reference node
Inorder Successor | null if current node is largest
The reference node
Inorder Predecessor | null if current node is smallest
staring value for search
ending value for search
A list of nodes within range [start
, end
]
The reference node
The ancestor of a node with the next largest data | null if right ancestor doesn't exists
Find Node with
data
in BSTIt find the node with the given data and if node doesn't exists it return null