#BinaryTree

BinaryTree

 publicclassTreeNode{publicintval;publicTreeNodeleft;publicTreeNoderight;publicTreeNode(intx){val=x;}}打印代码privatevoidWriteTreeNode(TreeNodenode){StringBuil...
代码星球 ·2021-02-08

二叉树BinaryTree构建测试(无序)

  此测试仅用于二叉树基本的性质测试,不包含插入、删除测试(此类一般属于有序树基本操作)。//二叉树树类publicclassBinaryTree{publicTreeNoderoot;//有一个根节点publicstaticintindex;publicTreeNodeCreateBTree(int[]a){Tree...