
数据结构
文章平均质量分 85
施工中请绕行
喜欢研究底层技术,编译原理,操作系统技术,数据库引擎实现原理。2012年校园招聘进入腾讯北分云平台部,从事终端开发职位。
展开
-
poj2255解题报告
Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4585 Accepted: 3061DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the no原创 2010-10-13 06:58:00 · 826 阅读 · 0 评论 -
POJ 3468 线段树
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 19890 Accepted: 5238Case Time Limit: 2000MSDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to原创 2011-05-08 14:25:00 · 849 阅读 · 0 评论 -
POJ 3264解题报告
Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 16578 Accepted: 7674Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to org原创 2011-04-04 09:24:00 · 912 阅读 · 1 评论 -
实现索引遇到的问题
这些问题是在实现索引时遇到的,我利用B+树实现了索引,整个索引包括以下三个部分:B+树结点,关键字和链接结点。B+树结点存储在索引页中。链接结点是为了解决重复关键字的问题而设计的,所有重复关键字的数据行在数据页的地址在B+树的叶结点以单链表的形式链接起来,其实就是拉链法解决冲突,整个链表保存在链接页中。 B+树的key域是一个64位的数据类型,只能保存整型或者实型的关键字原创 2013-04-03 10:26:13 · 4960 阅读 · 0 评论 -
AVL树实现
avl.h#ifndef avl_tree_h#define avl_tree_htypedef struct tree_node_t tree_node;struct tree_node_t { tree_node_t *left ,*right; struct { void *key; void *value; }kv; in原创 2013-10-14 18:37:58 · 1165 阅读 · 0 评论 -
B+树的实现
B+树是B树的变形,它在B树的节点里删除了关键字的指针域,只保留了链接节点的指针域,在叶节点上,这个链接节点的指针域用来保存关键字信息。B+树中的关键字在树中可能不止出现一次(最多出现两次),但一定在叶节点出现一次。相邻的叶节点用单链表形式连接起来,也就是说,找到了最左的叶节点后,所有关键字信息就可以按照遍历单链表的形式遍历出来。 虽然在B+树中关键字可能会冗余存原创 2011-12-10 14:41:02 · 10709 阅读 · 21 评论