2017年6月26日

红黑树(Red Black Tree)

摘要: class RBTree{ struct node{ int key, value; node *lson, *rson; node *p; bool color; }; node *root; node *null; void Left_Rotate(node *x) { node *t = x->rson; x->rson = t->lson; ... 阅读全文

posted @ 2017-06-26 16:37 gjing 阅读(111) 评论(0) 推荐(0)

2017年5月24日

AVL

摘要: 1 #include 2 using namespace std; 3 struct node; 4 node *null; 5 struct node{ 6 node *lc, *rc; 7 8 int dep; 9 int key, value; 10 11 inline void init(int _key, i... 阅读全文

posted @ 2017-05-24 20:52 gjing 阅读(198) 评论(0) 推荐(0)

2017年5月12日

博客开始

摘要: 从现在开始写好博客,可能会有不好的地方,请多多指教! 阅读全文

posted @ 2017-05-12 23:17 gjing 阅读(114) 评论(0) 推荐(0)

导航