单项选择题
以下哪个代码片段表示,检查 BST 是否有根节点,如果没有,那么这是棵新树,该节点就是根节点,否则,进入下()
A.if(this.root==null){this.root=n;}
B.if(this.root!=null){this.root=n;}
C.if(this.root==null){n=this.root;}
D.if(data<current.data) { current = current.left; if (current == null) { parent.left = n; break; } }
点击查看答案
相关考题
-
单项选择题
文档或浏览器窗口中发生的一些特定的交互瞬间,我们在js中称为什么?()
A.事件
B.dom
C.window
D.alert -
单项选择题
let set1 =new Set()set1.add(1);该代码中出现的add方法说明正确的是()
A.判断某元素是否存在
B.清除所有元素
C.从set中删除元素
D.向Set中添加元素 -
单项选择题
在vue中触发自定义事件使用什么原型方法()
A.$emit
B.$on
C.$off
D.$once
