SPLAY树各种操作--链表
摘要:
SPLAY树各种操作1.旋转2.插入3.删除4.查找5前驱6.后继7第k小/大8根据秩求元素View Code #include <stdio.h>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;//节点定义typedef struct node{ node *child[2], *pf; int v, size;}*Node;Node root = NULL;void preordertravel( Node p ){ if( p ) { 阅读全文
posted @ 2012-03-05 00:40 more think, more gains 阅读(344) 评论(0) 推荐(0) 编辑