#3853. [GESP202512 六级 C++] 第 10 题
[GESP202512 六级 C++] 第 10 题
以下函数实现了二叉排序树(BST)的( )操作。
TreeNode* op(TreeNode* root, int x) {
if (!root) return new TreeNode(x);
if (x < root->val)
root->left = op(root->left, x);
else
root->right = op(root->right, x);
return root;
}
{{ select(1) }}
- 查找
- 插入
- 删除
- 遍历