
DataStructure
screaming
这个作者很懒,什么都没留下…
展开
-
binary search tree
数据结构学习笔记二:二叉查找树二叉查找树的特点:(1)左边的所有节点都要小于根节点的值(2)右边的所有节点都要不小于根节点的值(3)原树的子树都符合(1)(2)条件。二叉查找树又名二叉排序树,因为只需中序遍历它就可以得到排序的树了,对于二叉排序树的操作主要有:(1)插入:通过插入来初始化树。本文是用链式,而不是存储在数组中。(转载 2016-06-01 10:14:04 · 334 阅读 · 0 评论 -
Trie
TrieWhat is a trie:You've probably already seen kinds of trees that store things more efficiently, such as a binary search tree. Here, we will examine another variant of a tree, called a tri转载 2016-06-04 23:11:35 · 712 阅读 · 0 评论 -
Trie
Trie树 Trie树 Trie树也称字典树,因为其效率很高,所以在在字符串查找、前缀匹配等中应用很广泛,其高效率是以空间为代价的。一.Trie树的原理 利用串构建一个字典树,这个字典树保存了串的公共前缀信息,因此可以降低查询操作的复杂度。转载 2016-06-15 22:53:39 · 346 阅读 · 0 评论 -
heapq
.4. heapq — Heap queue algorithmNew in version 2.3.Source code: Lib/heapq.pyThis module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm转载 2016-06-18 18:25:04 · 427 阅读 · 0 评论