![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
傻的可爱
这个作者很懒,什么都没留下…
展开
-
逆置链表
public ListNode reverseListNode(ListNode node){ ListNode pre = null; ListNode cur = node; while(cur != null){ ListNode next = cur.getNext(); cur.setNext(pre); pre = cur; cur = next;原创 2013-04-15 13:18:01 · 542 阅读 · 0 评论 -
字典树和使用场景
字典树,用来统计一篇文章中某个单词出现的次数.比hashmap要节省空间.我给出的例子,是输入很多个6位数字,统计每个数字出现的次数.因为是0-9个数字,所以next值也就是10.如果是26个字母,那么next值就是26,以此类推.字典树的建树方式很简单. #include "stdafx.h"using namespace std;// TODO: 在此处引用程序原创 2013-04-16 14:01:28 · 1074 阅读 · 0 评论 -
二叉查找树的后继
如果是先序排列的话Tree-Successor(x){ if(left(x) != null) return Tree-MiniMun(left(x)); if(right(x) != null) { return Tree-MaxMun(right(x)); } y = p[x]; while(y != null原创 2013-04-20 14:53:01 · 633 阅读 · 1 评论 -
文章格式比较好看的B-Tree的实现讲解的文章
http://www.geeksforgeeks.org/b-tree-set-1-insert-2/原创 2013-07-08 14:07:34 · 787 阅读 · 0 评论