<script>
// 创建二叉树的节点
// 二叉树包含:自身数据(data),左节点(left),右节点(right),显示自己的数据(show)
function Node(data,left,right){
this.data = data;
this.data = left;
this.right = right;
this.show = show;
}
// 声明二叉树的构造函数
// 二叉搜索树(binary search tree),也叫二叉排列数
function BST(){
this.root = null;//默认节点为null
this.insert = insert;//插入操作
this.inOrder = inOrder;//中序遍历
this.getMin = getMin;//找最小值
this.getMax = getMax;//找最大值
this.find = find;//找指定数据
}
</script>
二叉树的。。。
最新推荐文章于 2024-08-14 11:57:07 发布