06 2020 档案

摘要:int HeightOfBiTree(BiTree root) { //求二叉树的高度 int treeHeight = 0; if (root != NULL) { int leftHeight = HeightOfBiTree(root->lchild); int rightHeight = H 阅读全文
posted @ 2020-06-16 15:53 lin1235 阅读(156) 评论(0) 推荐(0)
摘要:#include<stdio.h> #include<stdlib.h> //树的定义 typedef char DataType; typedef struct Node { DataType data; struct Node *lchild; struct Node *rchild; } Bi 阅读全文
posted @ 2020-06-10 11:47 lin1235 阅读(97) 评论(0) 推荐(0)
摘要:定义:二叉排序树或者是一棵空树,或者是具有如 下性质的二叉树: 1、若它的左子树非空,则左子树上所有结点的值均小于它 的根结点的值; 2、若它的右子树非空,则右子树上所有结点的值均大于 (或大于等于)它的根结点的值; 3、 它的左、右子树也分别为二叉排序树 阅读全文
posted @ 2020-06-03 09:37 lin1235 阅读(120) 评论(0) 推荐(0)