06 2021 档案
摘要:串多用顺序结构,链式结构少用,这里提供链串的基本格式 #include<iostream>using namespace std;#define max 100typedef struct chunk{ char c[max + 1]; linkchunk next;}chunk,* linkchu
阅读全文
摘要:bf算法难度一般,kmp算法难度一般但是其中的找next[j]的算法比较难,很多小伙伴不好听明白, 在这我推荐你们看这个链接的视频(https://www.bilibili.com/video/av714697013/)讲解的很明白 通过动画理解代码的意义,这个不好理解多看多思考 #include<
阅读全文
摘要:链队列的基本实现操作,多思考用手画图思考辅助,思考多种情况 #include<iostream> //队列的链式表达,队列多用链式表达. using namespace std; typedef struct quee{ int age; linkquee next;}quee,*linkquee;
阅读全文
摘要:顺序队列的实现基本操作,思考画图辅助代码实现 #include<iostream>using namespace std; #define maxsize 4 //顺序实现队列//循环储存空间避免溢出错误//队列多用链表表示 typedef struct quee{ int* base;//指向in
阅读全文
摘要:递归嵌套和栈类似,先调用后计算,和先进后出类似 #include<iostream>using namespace std; //递归是什么意思(套娃)//long fact(int n)//{// if (n == 0) return 1;// else return n * fact(n - 1
阅读全文
摘要:基本操作难度不大,可以画图来辅助实现代码,也可脑袋思考敲代码。 #include<iostream>using namespace std; typedef struct stacknode{ int age; linkstack next;}stacknode ,*linkstack;//链栈只能
阅读全文
摘要:多思考可以通过画图来辅助思考再用代码实现 #include<iostream>using namespace std; //栈的实现//两个指针top base#define N 20//栈的总长度 typedef struct stack{ int* top;//top指向栈顶上一个 int* b
阅读全文
摘要:两个链表合并的算法 //1 单链表的合并 typedef struct list { int age; Linklist next; }sqlist ,*Linklist 1:首先来讲单链表是什么,单链表的节点只含有指向下一个节点的指针,尾节点的指针为NULL Linklist connect(Li
阅读全文

浙公网安备 33010602011771号