Complete the code to insert a value into a Binary Search Tree (BST).
if (root == null) { root = new Node([1]); }
The new node is created with the given value when the root is null.
Complete the code to decide whether to insert the value in the left subtree of a BST node.
if (value [1] root.data) { root.left = insert(root.left, value); }
In a BST, values less than the current node go to the left subtree.
Fix the error in the code to search a value in a BST.
if (root == null || root.data [1] value) { return root; }
The search returns the node if the current node's data equals the value.
Fill both blanks to complete the BST search logic for left and right subtree traversal.
if (value [1] root.data) { return search(root.left, value); } else if (value [2] root.data) { return search(root.right, value); }
If the value is less than the node's data, search left subtree; if greater, search right subtree.
Fill all three blanks to complete the code that finds the minimum value node in a BST.
Node current = root; while (current.[1] != null) { current = current.[2]; } return current.[3];
The minimum value in a BST is found by going left until no more left child exists, then returning the data.
