Complete the code to compare the current node's value with the target value.
if (node.Value [1] value) return node;
The search is successful when the current node's value equals the target value.
Complete the code to decide to search in the left subtree when the target value is smaller.
if (value [1] node.Value) return Search(node.Left, value);
If the target value is less than the current node's value, the search continues in the left subtree.
Fix the error in the recursive call to search the right subtree when the target value is greater.
return Search(node.[1], value);
When the target value is greater, the search should continue in the right subtree.
Fill both blanks to complete the base case and recursive search in the BST.
if (node == [1]) return null; if (value [2] node.Value) return Search(node.Left, value);
The base case returns null if the node is null (not found). If the value is less than the node's value, search left.
Fill all three blanks to complete the BST search method with all cases.
if (node == [1]) return null; if (value [2] node.Value) return Search(node.Left, value); else if (value [3] node.Value) return Search(node.Right, value); else return node;
The method returns null if node is null. It searches left if value is less, right if greater, else returns the node.
