摘要: 本题要求给定二叉树的4种遍历。 函数接口定义: void InorderTraversal( BinTree BT ); void PreorderTraversal( BinTree BT ); void PostorderTraversal( BinTree BT ); void Levelor 阅读全文
posted @ 2021-11-07 16:42 ekertree 阅读(74) 评论(0) 推荐(0)
摘要: 本题要求用非递归的方法实现对给定二叉树的 3 种遍历。 函数接口定义: void InorderTraversal( BinTree BT ); void PreorderTraversal( BinTree BT ); void PostorderTraversal( BinTree BT ); 阅读全文
posted @ 2021-11-07 16:40 ekertree 阅读(208) 评论(0) 推荐(0)
摘要: 编写函数计算二叉树的深度以及叶子节点数。二叉树采用二叉链表存储结构 函数接口定义: int GetDepthOfBiTree ( BiTree T); int LeafCount(BiTree T); 其中 T是用户传入的参数,表示二叉树根节点的地址。函数须返回二叉树的深度(也称为高度)。 裁判测试 阅读全文
posted @ 2021-11-07 16:37 ekertree 阅读(447) 评论(0) 推荐(0)