摘要: typedef struct AVLNode *Position; typedef Position AVLTree; /* AVL树类型 */ struct AVLNode{ ElementType Data; /* 结点数据 */ AVLTree Left; /* 指向左子树 */ AVLTre 阅读全文
posted @ 2019-08-11 21:48 董南 阅读(285) 评论(0) 推荐(0) 编辑
摘要: BinTree Insert( BinTree BST, ElementType X ) { if( !BST ){ /* 若原树为空,生成并返回一个结点的二叉搜索树 */ BST = (BinTree)malloc(sizeof(struct TNode)); BST->Data = X; BST 阅读全文
posted @ 2019-08-11 20:39 董南 阅读(666) 评论(0) 推荐(0) 编辑