- 博客(8)
- 问答 (1)
- 收藏
- 关注
原创 heap
#include<bits/stdc++.h>using namespace std;template<typename T> class Heap{ private: T a[100]; int index; public: void heapipy(); void push(T e); T top(
2016-08-29 22:51:34 470
原创 hdu3068 Manacher --> find the longest palindrome
#include<bits/stdc++.h>using namespace std;char ss[250020];char s[250020];int p[250000];int main(){ while(scanf("%s",s)!=EOF){ memset(p,0,sizeof(p)); int i,j; int len =
2016-08-12 22:12:07 250
原创 AVL
reference: 数据结构 邓俊辉 第三版#include<iostream>using std::swap;using std::cout;using std::cin;using std::endl;using std::max;#define pnode node*#define isRoot(x) (!((x).parent))#define isLChild(x) (!
2016-08-11 16:25:23 346
原创 Binary Search Tree (BST)
BST is a effective data structure for inserting,removing,searching. All of them cost log(n) #include<bits/stdc++.h>using namespace std;typedef struct node{ int value; node* lc; node* rc;}
2016-08-05 18:05:16 231
原创 adjacency_matrix & adjacency_list
/* * 3--------4--------5 * | | | * | | | * | | | * 1--------2--------6 * \ / *
2016-08-03 20:48:23 882
原创 Hash Table
A simple hash table code, to be continuedimport randomHT = [None for x in range(15)]res = random.randrange(100)key = 13l = len(HT)## count(elements)<key<l#def insert(n): ans = n%key
2016-08-01 15:46:59 267
原创 Linked List->single linked list
#include<bits/stdc++.h>using namespace std;typedef struct List{ int value; List* next;}*Link;Link head = NULL;Link tail = NULL;void InsertHead(int value){ Link tmp = new List; tmp->
2016-08-01 01:00:20 326
空空如也
gvim imap 会注释所有文字怎么办
2015-02-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人