加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
BinarySearchTree.java 826 Bytes
一键复制 编辑 原始数据 按行查看 历史
戴书博 提交于 2020-06-11 18:08 . aa
package day_04;
/**
* Binary search tree implementation.
*
* In computer science, a binary search tree (BST), which may sometimes also be
* called an ordered or sorted binary tree, is a node-based binary tree data
* structure which has the following properties:
*
* a) The left subtree of a node contains only nodes with keys less than the node's key. </br>
* b) The right subtree of a node contains only nodes with keys greater than the node's key. </br>
* c) Both the left and right subtrees must also be binary search trees. </br>
*
* @author Ignas Lelys
* @created May 6, 2011
*
*/
public class BinarySearchTree extends AbstractBinarySearchTree {
@Override
protected Node createNode(int value, Node parent, Node left, Node right) {
return new Node(value, parent, left, right);
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化