From 9c116681097f3a2d0cc5c2286ad085113546a292 Mon Sep 17 00:00:00 2001 From: mbinary Date: Wed, 11 Jul 2018 19:55:44 +0800 Subject: [PATCH] correct typo --- algorithm/README.md | 3 +-- dataStructure/README.md | 44 ++++++++++++++++++++--------------------- notes/README.md | 18 +++++------------ notes/hashTable.md | 2 +- notes/sort.md | 2 +- notes/tree.md | 18 +---------------- 6 files changed, 31 insertions(+), 56 deletions(-) diff --git a/algorithm/README.md b/algorithm/README.md index cbd80b3..7389c32 100644 --- a/algorithm/README.md +++ b/algorithm/README.md @@ -7,7 +7,6 @@ * [EIGHT.py](./EIGHT.py) * [manacher.py](./manacher.py) * [markov.py](./markov.py) - * [README.md](./README.md) * [sort](./sort) * [binaryTree.py](./sort/binaryTree.py) * [heapSort.py](./sort/heapSort.py) @@ -15,5 +14,5 @@ * [radixSort.py](./sort/radixSort.py) * [select.py](./sort/select.py) * [shellSort.py](./sort/shellSort.py) - * [steganography_to_do.py](./steganography_to_do.py) * [sunday.py](./sunday.py) + * [README.md](./README.md) diff --git a/dataStructure/README.md b/dataStructure/README.md index f72a7f6..f6dcf5a 100644 --- a/dataStructure/README.md +++ b/dataStructure/README.md @@ -1,25 +1,25 @@ # 数据结构的实现 # 索引 * [.](.) - * [allOone](./allOone) - * [allOone.py](./allOone/allOone.py) - * [test.py](./allOone/test.py) - * [binaryHeap.py](./binaryHeap.py) - * [binaryIndexedTree.cc](./binaryIndexedTree.cc) - * [binaryTree.py](./binaryTree.py) - * [hashTable.py](./hashTable.py) - * [huffman.cc](./huffman.cc) - * [leftHeap.py](./leftHeap.py) - * [loserTree.py](./loserTree.py) - * [map](./map) - * [map.cc](./map/map.cc) - * [map.exe](./map/map.exe) - * [README.md](./README.md) - * [segTree.cc](./segTree.cc) - * [splayTree.py](./splayTree.py) - * [stack](./stack) - * [stack.cc](./stack/stack.cc) - * [stack.exe](./stack/stack.exe) - * [stack.o](./stack/stack.o) - * [trie.py](./trie.py) - * [winnerTree.py](./winnerTree.py) + * [allOone](./allOone) + * [allOone.py](./allOone/allOone.py) + * [test.py](./allOone/test.py) + * [binaryHeap.py](./binaryHeap.py) + * [binaryIndexedTree.cc](./binaryIndexedTree.cc) + * [binaryTree.py](./binaryTree.py) + * [hashTable.py](./hashTable.py) + * [huffman.cc](./huffman.cc) + * [leftHeap.py](./leftHeap.py) + * [loserTree.py](./loserTree.py) + * [map](./map) + * [map.cc](./map/map.cc) + * [map.exe](./map/map.exe) + * [segTree.cc](./segTree.cc) + * [splayTree.py](./splayTree.py) + * [stack](./stack) + * [stack.cc](./stack/stack.cc) + * [stack.exe](./stack/stack.exe) + * [stack.o](./stack/stack.o) + * [trie.py](./trie.py) + * [winnerTree.py](./winnerTree.py) + * [README.md](./README.md) diff --git a/notes/README.md b/notes/README.md index 8d2c769..b251689 100644 --- a/notes/README.md +++ b/notes/README.md @@ -4,16 +4,8 @@ # 索引 * [.](.) - * [alg-general.md](./alg-general.md) - * [hashTable.md](./hashTable.md) - * [README.md](./README.md) - * [sort.md](./sort.md) - * [src](./src) - * [coin1.jpg](./src/coin1.jpg) - * [coin2.jpg](./src/coin2.jpg) - * [coin3.jpg](./src/coin3.jpg) - * [coin4.jpg](./src/coin4.jpg) - * [recursive-tree.jpg](./src/recursive-tree.jpg) - * [symbol.jpg](./src/symbol.jpg) - * [test.jpg](./src/test.jpg) - * [tree.md](./tree.md) + * [alg-general.md](./alg-general.md) + * [hashTable.md](./hashTable.md) + * [sort.md](./sort.md) + * [tree.md](./tree.md) + * [README.md](./README.md) diff --git a/notes/hashTable.md b/notes/hashTable.md index d234a70..6cacfe9 100644 --- a/notes/hashTable.md +++ b/notes/hashTable.md @@ -28,7 +28,7 @@ description: -**[github地址](https://github.com/mbinary/algorithm-and-data-struture.git)** +**[github地址](https://github.com/mbinary/algorithm-and-data-structure.git)** 哈希表 (hash table) , 可以实现 $O(1)$ 的 read, write, update 相对应 python 中的 dict, c语言中的 map diff --git a/notes/sort.md b/notes/sort.md index 92644b0..7a20109 100644 --- a/notes/sort.md +++ b/notes/sort.md @@ -36,7 +36,7 @@ description: -**[github地址](https://github.com/mbinary/algorithm-and-data-struture.git)** +**[github地址](https://github.com/mbinary/algorithm-and-data-structure.git)** 排序的本质就是减少逆序数, 根据是否进行比较,可以分为如下两类. * 比较排序 diff --git a/notes/tree.md b/notes/tree.md index cfc6253..88c4bf7 100644 --- a/notes/tree.md +++ b/notes/tree.md @@ -35,7 +35,7 @@ description: -**[github地址](https://github.com/mbinary/algorithm-and-data-struture.git)** +**[github地址](https://github.com/mbinary/algorithm-and-data-structure.git)** # 1. 概念 * 双亲 @@ -177,22 +177,6 @@ Aho-Corasick automation,是在字典树上添加匹配失败边(失配指针), >![](https://upload-images.jianshu.io/upload_images/7130568-85329df49fa54685.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) - -在每一步中,算法先查找当前节点的 “孩子节点”,如果没有找到匹配,查找它的后缀节点(suffix) 的孩子,如果仍然没有,接着查找后缀节点的后缀节点的孩子, 如此循环, 直到根结点,如果到达根节点仍没有找到匹配则结束。 - -当算法查找到一个节点,则输出所有结束在当前位置的字典项。输出步骤为首先找到该节点的字典后缀,然后用递归的方式一直执行到节点没有字典前缀为止。同时,如果该节点为一个字典节点,则输出该节点本身。 - -输入 abccab 后算法的执行步骤如下: - -输入字符串的分析 abccab -节点 剩余字符串 输出:结束位置 过渡 输出 -() abccab 从根开始 -(a) bccab a:1 ()→子节点 (a) 当前节点 -(ab) ccab ab:2 (a)→子节点 (ab) 当前节点 -(bc) cab bc:3, c:3 (ab)→后缀节点 (b)→子节点 (bc) 当前节点,字典后缀 -(c) ab c:4 (bc)→后缀节点 (c)→后缀节点 ()→子节点 (c) 当前节点 -(ca) b a:5 (c)→(ca) 字典后缀 -(ab) ab:6 (ca)→后缀节点 (a)→子节点 (ab) 当前节点 # 5. 平衡二叉树 上面的二叉查找树不平衡,即经过多次插入,删除后, 其高度变化大, 不能保持$\Theta(n)$的性能