📅  最后修改于: 2022-03-11 14:44:48.680000             🧑  作者: Mango
Node* search(Node* root, int key) {
if(root == NULL || root->data == key)
return root;
// Key is greater than root's data
if(root->data < key)
return search(root->right,key);
// Key is smaller than root's data
return search(root->left,key);
}
C++Copy