![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构作业
喜欢数学的女孩の
这个作者很懒,什么都没留下…
展开
-
数据结构——树和二叉树 6-2 二叉树的遍历 (25 分)
本题要求给定二叉树的4种遍历。 函数接口定义: void InorderTraversal( BinTree BT ); void PreorderTraversal( BinTree BT ); void PostorderTraversal( BinTree BT ); void LevelorderTraversal( BinTree BT ); 其中BinTree结构定义如下: typedef struct TNode *Position; typedef Position BinTre原创 2021-06-01 16:13:42 · 156 阅读 · 0 评论 -
数据结构——树和二叉树 6-1 求二叉树高度 (20 分)
本题要求给定二叉树的高度。 函数接口定义: int GetHeight( BinTree BT ); 其中BinTree结构定义如下: typedef struct TNode *Position; typedef Position BinTree; struct TNode{ ElementType Data; BinTree Left; BinTree Right; }; 要求函数返回给定二叉树BT的高度值。 裁判测试程序样例: #include <st原创 2021-06-01 15:22:19 · 1618 阅读 · 0 评论