以下代码希望能在一棵二叉排序树中搜索特定的值,请在横线处填入( ),使其能正确实现相应功能。
TreeNode* search(TreeNode* root, int target) {
if (root == NULL || root->val == target) {
return root;
}
if (_______________) {
return search(root->left, target);
} else {
return search(root->right, target);
}
}
target < root->left
target < root->val
target > root->val
target > root->left