├── AVL树 ├── AVLTree.cpp └── AVLTreeNode.h ├── Treap ├── Treap(NEW).ppt ├── Treap.cpp └── TreapNode.h ├── 主席树 └── ChairTree.cpp ├── 二叉查找树 ├── BinarySearchTree.cpp └── BinarySearchTreeNode.h ├── 二项堆 ├── BinaryHeap.cpp └── BinaryHeapNode.h ├── 伸展树 ├── SplayTree.cpp └── SplayTreeNode.h ├── 多个有序链表合并 └── MergeSList.cpp ├── 栈与队列相互模拟以及最小(大)值求解 ├── MyQueue.h ├── MyStack.h ├── QueueWithMin.h ├── StackWithMin.h └── stackAndqueue.cpp ├── 红黑树 ├── RBTree │ ├── Main.jar │ └── Main_lib │ │ ├── EasisBase.jar │ │ ├── EasisXClient.jar │ │ ├── forms-1.3.0.jar │ │ ├── freemarker.jar │ │ ├── jgoodies-common-1.6.0.jar │ │ ├── jgraphx.jar │ │ ├── log4j-1.2.17.jar │ │ ├── slf4j-api-1.7.5.jar │ │ ├── slf4j-jdk14-1.7.5.jar │ │ └── velocity-1.7-dep.jar └── 我的红黑树 │ ├── RedBlackNode.h │ └── RedBlackTree.cpp └── 跳表 └── SkipList.cpp /AVL树/AVLTree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/AVL树/AVLTree.cpp -------------------------------------------------------------------------------- /AVL树/AVLTreeNode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/AVL树/AVLTreeNode.h -------------------------------------------------------------------------------- /Treap/Treap(NEW).ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/Treap/Treap(NEW).ppt -------------------------------------------------------------------------------- /Treap/Treap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/Treap/Treap.cpp -------------------------------------------------------------------------------- /Treap/TreapNode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/Treap/TreapNode.h -------------------------------------------------------------------------------- /主席树/ChairTree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/主席树/ChairTree.cpp -------------------------------------------------------------------------------- /二叉查找树/BinarySearchTree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/二叉查找树/BinarySearchTree.cpp -------------------------------------------------------------------------------- /二叉查找树/BinarySearchTreeNode.h: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | struct BinarySearchTreeNode 5 | { 6 | int key; 7 | BinarySearchTreeNode *leftChild; 8 | BinarySearchTreeNode *rightChild; 9 | BinarySearchTreeNode(int tempKey) 10 | { 11 | key=tempKey; 12 | leftChild=NULL; 13 | rightChild=NULL; 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /二项堆/BinaryHeap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/二项堆/BinaryHeap.cpp -------------------------------------------------------------------------------- /二项堆/BinaryHeapNode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/二项堆/BinaryHeapNode.h -------------------------------------------------------------------------------- /伸展树/SplayTree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/伸展树/SplayTree.cpp -------------------------------------------------------------------------------- /伸展树/SplayTreeNode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XuJin1992/AdvancedDataStructures/1a1fbaa27b16a53eb4ce70fd96a1b8ac69296649/伸展树/SplayTreeNode.h -------------------------------------------------------------------------------- /多个有序链表合并/MergeSList.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | struct SNode 6 | { 7 | int key; 8 | SNode *next; 9 | }; 10 | 11 | class SList 12 | { 13 | private : 14 | SNode *head; 15 | public: 16 | SList(); 17 | void insertSort(int); 18 | void insertSort(SList &); 19 | void merge(SList &); 20 | void print(); 21 | }; 22 | 23 | SList::SList() 24 | { 25 | head=new SNode; 26 | head->next=NULL; 27 | } 28 | 29 | void SList::insertSort(int tmpKey) 30 | { 31 | SNode *p=new SNode; 32 | p->key=tmpKey; 33 | p->next=NULL; 34 | SNode *pre=NULL,*cur=head->next; 35 | while(cur!=NULL) 36 | { 37 | if(cur->key>=tmpKey) 38 | break; 39 | pre=cur; 40 | cur=cur->next; 41 | } 42 | if(NULL==pre) 43 | { 44 | p->next=head->next; 45 | head->next=p; 46 | } 47 | else 48 | { 49 | pre->next=p; 50 | p->next=cur; 51 | } 52 | } 53 | 54 | void SList::merge(SList &tempSList) 55 | { 56 | SNode *p,*q,*com; 57 | com=head; 58 | p=head->next; 59 | q=tempSList.head->next; 60 | while(p!=NULL&&q!=NULL) 61 | { 62 | if(p->keykey) 63 | { 64 | com->next=p; 65 | p=p->next; 66 | } 67 | else 68 | { 69 | com->next=q; 70 | q=q->next; 71 | } 72 | com=com->next; 73 | } 74 | if(q!=NULL) 75 | com->next=q; 76 | if(p!=NULL) 77 | com->next=p; 78 | } 79 | 80 | void SList::print() 81 | { 82 | SNode *p=head->next; 83 | while(p!=NULL) 84 | { 85 | cout<key<<" "; 86 | p=p->next; 87 | } 88 | cout<>1; 96 | int l=mergeSort(tArray,tLeft,mid); 97 | int r=mergeSort(tArray,mid+1,tRight); 98 | tArray[l].merge(tArray[r]); 99 | return l; 100 | } 101 | 102 | int main() 103 | { 104 | int n=10,i,j=0; 105 | SList *mySList=new SList[n]; 106 | while(j