OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b782e9
)
Update ac-automaton.md
author
Xu Dafeng
<xudafeng88@qq.com>
Mon, 9 Sep 2019 12:48:40 +0000
(20:48 +0800)
committer
GitHub
<noreply@github.com>
Mon, 9 Sep 2019 12:48:40 +0000
(20:48 +0800)
Fix typo
docs/string/ac-automaton.md
patch
|
blob
|
history
diff --git
a/docs/string/ac-automaton.md
b/docs/string/ac-automaton.md
index
03069e4
..
8147d0e
100644
(file)
--- a/
docs/string/ac-automaton.md
+++ b/
docs/string/ac-automaton.md
@@
-92,7
+92,7
@@
void build() {
}
```
-为~~关爱萌新~~,笔者大力~~复读~~一下代码:Build 函数将结点按 BFS 顺序入队,依次求 fail 指针。这里的字典树根结点为 0,我们将根结点的子结点一一入队。若将根结点入队,则在第一次 BFS 的时候,会将根结点儿子的 fail 指针标记为本身。因此我们将根结点的儿子。
+为~~关爱萌新~~,笔者大力~~复读~~一下代码:Build 函数将结点按 BFS 顺序入队,依次求 fail 指针。这里的字典树根结点为 0,我们将根结点的子结点一一入队。若将根结点入队,则在第一次 BFS 的时候,会将根结点儿子的 fail 指针标记为本身。因此我们将根结点的儿子
一一入队,而不是将根结点入队
。
然后开始 BFS:每次取出队首的结点 u。fail[u]指针已经求得,我们要求 u 的子结点们的 fail 指针。然后遍历字符集(这里是 0-25,对应 a-z):