测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A67153. 以下函数实现了二叉排序树(BST)的( )操作。TreeNode* op(TreeNode* root, int x) {

单选题

题目描述

以下函数实现了二叉排序树(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;
}


选项(单选)