登录
首页 » C/C++ » sy2

sy2

于 2020-11-20 发布 文件大小:130KB
0 48
下载积分: 1 下载次数: 1

代码说明:

  用递归的方法实现以下算法: 1.以二叉链表表示二叉树,建立一棵二叉树(算法5.3); 2.输出二叉树的中序遍历结果(算法5.1); 3.输出二叉树的前序遍历结果(见讲稿); 4.输出二叉树的后序遍历结果(见讲稿); 5.计算二叉树的深度(算法5.5); 6.统计二叉树的结点个数(算法5.6); 7.统计二叉树的叶结点个数; 8.统计二叉树的度为1的结点个数; 9.输出二叉树中从每个叶子结点到根结点的路径。(The following algorithm is implemented using a recursive method: 1., the two fork list is used to represent the two fork tree, and a two fork tree is established (algorithm 5.3). 2. output two order tree traversal results (algorithm 5.1); 3. output two prefix traversal results (see lecture notes); 4. output the result of traversal traversal of two fork tree (see lecture notes). 5. calculate the depth of the two forked tree (algorithm 5.5); 6. statistics the number of nodes of the two fork tree (algorithm 5.6). 7. statistics of the number of leaf nodes of the two forked tree; 8. the number of nodes of the two forked tree is 1. 9. output the path from each leaf node to the root node in the two fork tree.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696522资源总数
  • 104031会员总数
  • 39今日下载