From 31751813b4bde1f63ed4c629a7dcf4a67ffefa01 Mon Sep 17 00:00:00 2001 From: nonstriater <410495266@qq.com> Date: Mon, 19 Oct 2015 10:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=8C=E5=8F=89=E6=A0=91re?= =?UTF-8?q?adme.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 二叉树/README.md | 58 +++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/二叉树/README.md b/二叉树/README.md index 2457e33..ddad6d0 100644 --- a/二叉树/README.md +++ b/二叉树/README.md @@ -9,8 +9,8 @@ 3. 任意节点左右子树也为二叉查找树 4. 没有键值相等的节点 - - ```typedef int ElemType; + ``` + typedef int ElemType; typedef struct BiSearchTree{ ElemType key; struct BiSearchTree *lChild; @@ -30,8 +30,7 @@ 思路一: 选左子树的最大节点,或右子树最小节点替换 - - +``` int bisearch_tree_delete(BiSearchTree **tree,ElemType node){ if (NULL==tree) { @@ -107,7 +106,7 @@ int bisearch_tree_delete(BiSearchTree **tree,ElemType node){ } return 0; } - +``` ## 伸展树 (splay tree) @@ -118,29 +117,6 @@ n个节点的完全二叉树,其查找,删除的复杂度都是O(logN),但 -## AVL树 - - -## 红黑树 - - -## Treap 树 - - - - -## B树 - - - -## B+树 - - -## B*树 - - -## R树 - ## 赫夫曼编码 Huffman @@ -273,11 +249,11 @@ double-array trie 参考作者的这篇论文 http://linux.thai.net/~thep/datri 给你N 个互不相同的仅由一个单词构成的英文名,让你将它们按字典序从小到大排序输出 分析:这是trie树排序的典型应用,建立N个单词的trie树,然后线序遍历整个树,就可以达到效果。 + + ## 后缀树(suffix tree) - - ###后缀树的应用 可以解决很多字符串的问题 @@ -289,6 +265,28 @@ double-array trie 参考作者的这篇论文 http://linux.thai.net/~thep/datri +## AVL树 + + +## 红黑树 + + +## Treap 树 + + +## B树 + + +## B+树 + + +## B*树 + + +## R树 + + +