首页 / 客观题库
下面代码实现二叉搜索树的插入操作。假设树中不存在重复值,横线处应填写( )
TreeNode* insertNode(TreeNode* root, int x) {
if (root == nullptr) {
return new TreeNode(x);
}
if (x < root->val) {
__________________________
else {
root->right = insertNode(root->right, x);
return root;
A 下面代码实现二叉搜索树的插入操作。假设树中不存在重复值,横线处应填写( ) TreeNode* insertNode(TreeNode* root, int x) { if (root == nullptr) { return new TreeNode(x); } if (x < root->val) { __________________________ } else { root->right = insertNode(root->right, x); } return root; }
B root = insertNode(root->left, x);
C root->right = insertNode(root->left, x);
D insertNode(root->left, x);
18213408360
密码必须包含数字、字母和特殊字符
错误.in文件下载
错误.out文件下载