binarynode.java
来自「Data StructuresAnd Algorithm Analysis In」· Java 代码 · 共 27 行
JAVA
27 行
package DataStructures;
// Basic node stored in unbalanced binary search trees
// Note that this class is not accessible outside
// of package DataStructures
class BinaryNode
{
// Constructors
BinaryNode( Comparable theElement )
{
this( theElement, null, null );
}
BinaryNode( Comparable theElement, BinaryNode lt, BinaryNode rt )
{
element = theElement;
left = lt;
right = rt;
}
// Friendly data; accessible by other package routines
Comparable element; // The data in the node
BinaryNode left; // Left child
BinaryNode right; // Right child
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?