09 2020 档案

摘要:方式一【大话数据结构】: #include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1 #define ERROR 0 #define TRUE 1 #d 阅读全文
posted @ 2020-09-28 17:27 墨狮 阅读(2115) 评论(0) 推荐(0)
摘要:以下实现的是一个基于数组存储的完全二叉树 完全二叉树特征: 层序存储位置(k, p)与数组位置(i)之间的关系:i = 2^(p-1) + (q -1) 数组中,结点(p)与左子树(i)的位置关系:i = 2*p + 1 数组中,结点(p)与右子树(i)的位置关系:i = 2*p + 2 数组中,子 阅读全文
posted @ 2020-09-21 15:00 墨狮 阅读(811) 评论(0) 推荐(0)
摘要:前序遍历二叉树:ABDHKECFIGJ 中序遍历二叉树:HKDBEAIFCGJ 后序遍历二叉树:KHDEBIFJGCA // 二叉树的链式存储 #include "stdlib.h" #include "stdio.h" #include "io.h" #include "string.h" #in 阅读全文
posted @ 2020-09-18 11:41 墨狮 阅读(446) 评论(0) 推荐(0)