摘要: 有意说一,这玩意挺绕的,结合图进行理解比较好; 1 #include <iostream> 2 #include<cstdio> 3 #define size 50 4 using namespace std; 5 /************线索二叉树的主要的地方在于利用剩余的空闲结点来指引节点的前 阅读全文
posted @ 2021-09-09 11:52 Mexcellent 阅读(67) 评论(0) 推荐(0)
摘要: 对于非递归转化,主要时要熟练掌握递归有关运用栈的原理。代码如下; 1 #include<cstdio> 2 #include <iostream> 3 #include<cstring> 4 #define size 50 5 using namespace std; 6 typedef struc 阅读全文
posted @ 2021-09-08 11:52 Mexcellent 阅读(41) 评论(0) 推荐(0)
摘要: 在进行创建或遍历时一定得知道递归正真原理,能在脑子中构思出来,这样也能更简单得转化成非递归的形式;接下来的文章我会不断讲解; 1 #include<cstdio> 2 #include <iostream> 3 #include<cstring> 4 #define size 50 5 using 阅读全文
posted @ 2021-09-07 22:35 Mexcellent 阅读(40) 评论(0) 推荐(0)
摘要: #include<cstdio> #include <iostream> using namespace std; int Fib(int n) { if (n == 0) return 0; else if (n == 1) return 1; else return Fib(n - 1) + F 阅读全文
posted @ 2021-08-10 09:38 Mexcellent 阅读(62) 评论(0) 推荐(0)
摘要: #include<cstdio> #include <iostream> #define MAxsize 5 using namespace std; typedef struct { int Data[MAxsize]; int front; int rear; }SqQueue; bool In 阅读全文
posted @ 2021-08-10 09:19 Mexcellent 阅读(21) 评论(0) 推荐(0)
摘要: 1 #include<cstdio> 2 #include<cstdlib> 3 #include <iostream> 4 #define Maxsize 50 5 using namespace std; 6 typedef struct 7 { 8 char Data[Maxsize]; 9 阅读全文
posted @ 2021-08-07 10:47 Mexcellent 阅读(41) 评论(0) 推荐(0)
摘要: #include <iostream> #include<cstdio> using namespace std; typedef struct LinkNode {//队列链式结构 int Data; struct LinkNode* next; }LinkNode; typedef struct 阅读全文
posted @ 2021-07-30 19:43 Mexcellent 阅读(26) 评论(0) 推荐(0)
摘要: #include<cstdio> #include <iostream> #define Maxsize 50 using namespace std; typedef struct { int Data[Maxsize]; int top; }Sqstack; void Initstack(Sqs 阅读全文
posted @ 2021-07-30 09:35 Mexcellent 阅读(27) 评论(0) 推荐(0)
摘要: #include<cstdio> #include <iostream> using namespace std; typedef struct DNode { int data; struct DNode* next, * prior; }DNode,*DLinklist; /*********双 阅读全文
posted @ 2021-07-30 09:34 Mexcellent 阅读(31) 评论(0) 推荐(0)
摘要: 单向链表的创建:有头节点和无头结点的插入创建方法; 1 #include<cstdio> 2 #include <iostream> 3 using namespace std; 4 typedef struct LNode { 5 int data; 6 struct LNode* next; 7 阅读全文
posted @ 2021-07-11 22:28 Mexcellent 阅读(36) 评论(0) 推荐(0)