上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页
摘要: #include#include#include#include#include#include#includeusing nam... 阅读全文
posted @ 2020-07-26 11:23 _Hsiung 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 还是中序遍历建树,只不过这次利用二叉树静态写法,因为给出结点编号的关系。 #include#include#include#inc... 阅读全文
posted @ 2020-07-26 10:36 _Hsiung 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 因为每个结点左子节点下标2i 右2i+1 然后开一个数组,因为是完全二叉搜索树,可以用数组来存值,讲赋值的数组从小到大排序然后直接... 阅读全文
posted @ 2020-07-26 09:28 _Hsiung 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 题目思路:先建树,先序遍历一遍和输入的比较判断是yes还是no,然后注意镜像树先序就是先遍历右边的 后序也先遍历右边的 #incl... 阅读全文
posted @ 2020-07-25 17:41 _Hsiung 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 输出最小价格和能提供最低价格的叶子结点的个数 #include#include#include#include#include#i... 阅读全文
posted @ 2020-07-24 17:40 _Hsiung 阅读(58) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#includeusing nam... 阅读全文
posted @ 2020-07-24 16:57 _Hsiung 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 这里是按层求最大节点个数及所在的层数,所以要每条路走一遍记录一下。 #include#include#include#includ... 阅读全文
posted @ 2020-07-24 15:58 _Hsiung 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#includeusing nam... 阅读全文
posted @ 2020-07-24 11:23 _Hsiung 阅读(55) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#includeusing nam... 阅读全文
posted @ 2020-07-24 10:32 _Hsiung 阅读(51) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#includeusing namespace s... 阅读全文
posted @ 2020-07-24 08:40 _Hsiung 阅读(50) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页