原创 二叉樹的建立(已知前序序列和中序序列)
已知二叉樹前序序列和中序序列遞歸創建二叉樹 #include<bits/stdc++.h> using namespace std; typedef struct Node{ char data;
原创 基於開放地址法的哈希表(散列表)
#include<iostream> #include<string> #include<cctype> #include<fstream> #include<algorithm> using namespace std; con
原创 基數排序(MSD)
#include<iostream> #include<string> #include<cctype> #include<fstream> #include<algorithm> using namespace std; int
原创 基於鏈接法的哈希表的構造
#include<iostream> #include<string> #include<cctype> #include<fstream> #include<algorithm> using namespace std; con
原创 最大堆(MaxHeap)的基本操作(建立,插入和刪除)
#include<iostream> #include<vector> #include<algorithm> #include<map> #include<fstream> #include<cctype> using name
原创 AVL樹(平衡二叉樹)的構建及其基本的插入操作
#include<iostream> #include<algorithm> #include<cctype> #include<fstream> #include<cstring> using namespace std; st
原创 Trie (字典樹) 的基本操作---插入,刪除,單詞前綴匹配等等
#include<iostream> #include<vector> #include<algorithm> #include<cctype> using namespace std; const int R = 26; t
原创 用類去封裝一個可變長數組(Vector)
#include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> #include<cctype> #include<fstream> using na
原创 如何用KMP字符串匹配算法求出主串中所包含模式串的總個數
如何用KMP字符串匹配算法求出主串中所包含模式串的總個數 #include<bits/stdc++.h> using namespace std; void getnext(int next[],string s,int len)
原创 二叉樹的不知道是什麼的狗屁建立
已知二叉樹前序序列和中序序列遞歸創建二叉樹 #include<bits/stdc++.h> using namespace std; typedef struct Node{ char data;
原创 C++在類中實現二叉樹的建立和遍歷
C++在類中實現二叉樹的建立和遍歷 #include<bits/stdc++.h> using namespace std; typedef struct Node{ char data; stru
原创 二叉排序樹的基本騷操作
二叉排序樹的基本操作 #include<bits/stdc++.h> using namespace std; struct BiTree{ int data; struct BiTree *lchild,*rch