2024年6月20日
摘要: # include <stdio.h> # include <iostream> # include <string.h> using namespace std; typedef struct //define structure HuffmanTree { int weight; int par 阅读全文
posted @ 2024-06-20 17:52 findscripter 阅读(26) 评论(0) 推荐(0)
摘要: # include <stdio.h> # include <iostream> # include <string.h> using namespace std; typedef struct //define structure HuffmanTree { int weight; int par 阅读全文
posted @ 2024-06-20 17:51 findscripter 阅读(12) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include "bitree.h" #include "sqstack.h" void InOrderTraverse2(BiTree T,void(*Visit)(TElemType));// 中序非递归遍历二叉树 阅读全文
posted @ 2024-06-20 17:50 findscripter 阅读(18) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include "bitree.h" #include "sqstack.h" void exchange ( BiTree T ) ; // 实现二叉树左右子树的交换(非递归法) int main() { BiTree 阅读全文
posted @ 2024-06-20 17:43 findscripter 阅读(34) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include "bitree.h" #include "linkqueue.h" void LevelOrderTraverse(BiTree T,void(*Visit)(TElemType)); int main( 阅读全文
posted @ 2024-06-20 17:42 findscripter 阅读(10) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include "bitree.h" int BiTreeDepth(BiTree T);//计算该二叉树的深度,返回深度值 int NodeCount(BiTree T);//计算该二叉树的总的节点个数,返回节点个数 阅读全文
posted @ 2024-06-20 17:42 findscripter 阅读(56) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include "bitree.h" void exchange ( BiTree T ) ; // 实现二叉树左右子树的交换(递归法) int main() { BiTree T; CreateBiTree(T); p 阅读全文
posted @ 2024-06-20 17:42 findscripter 阅读(53) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include "bitree.h" TElemType Nil='#'; void visit(TElemType s) { printf("%c,",s); } void input(TElemType &s) { 阅读全文
posted @ 2024-06-20 17:41 findscripter 阅读(19) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define OK 1 #define ERROR 0 #define MAX_TREE_SIZE 100 typedef char TElemType 阅读全文
posted @ 2024-06-20 17:41 findscripter 阅读(18) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<limits.h> #include<iostream> using namespace std; #include"MGraph.h" void Dijkstra(MG 阅读全文
posted @ 2024-06-20 17:38 findscripter 阅读(19) 评论(0) 推荐(0)