随笔分类 - 数据结构
摘要:###递归算法NB #include <iostream> using namespace std; typedef char BTDataType; typedef struct BiTNode { BTDataType data; struct BiTNode* lchild, * rchild
阅读全文
摘要:##BF算法 算法思路比较简单,跟KMP比简直幼儿园级别的,可以指定主串中查找的起始位置,每次匹配失败指针回溯主串指针i=i-j+1,子串指针j=1 #include <iostream> using namespace std; int Index_BF(string A, string B, i
阅读全文
摘要:##循环队列 #include <iostream> using namespace std; #define MAXQSIZE 100 typedef int QElemType; typedef struct { QElemType* base; int front; //头指针 int rea
阅读全文
摘要:##顺序栈 #include <iostream> using namespace std; #define MAXSIZE 100 typedef int SElemType; typedef struct { SElemType* base; SElemType* top; int stacks
阅读全文
摘要:##顺序表 #include <iostream> using namespace std; constexpr auto MAXSIZE = 100; constexpr auto ERROR = 0; constexpr auto OK = 1; typedef int ElemType; //
阅读全文

浙公网安备 33010602011771号