下面函数在二叉搜索树中查找值 x。横线处应填写( )。
TreeNode *searchBST(TreeNode *root, int x) {
if (root == nullptr || root->val == x)
return root;
if (x < root->val)
return searchBST(root->left, x);
return __________________________;
}
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析