原理图:
源代码:
Node:
/*
* 二叉树结点*/
public class Node {
public int data; //数据项
public Node leftChild; //左子结点
public Node rightChild; //右子结点
public Node(int data) {
// TODO Auto-generated constructor stub
this.data = data;
}
}
Tree:
public class Tree {
private Node root; //根结点
//插入结点
public void insert(int value)
{
}
//查找结点
public void find(int value)
{
}
//删除结点
public void delete(int value)
{
}
}