Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdompeak authored Jul 26, 2017
1 parent b5d5fca commit 91e68fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Trie/648.Replace-Words/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

对于Trie类型的基本功操作包括:
1. Trie类型的定义:包括两个成员变量,构造函数
```
```cpp
class TrieNode
{
public:
Expand All @@ -20,7 +20,7 @@ class TrieNode
};
```
2. Trie的单词添加
```
```cpp
void addWord(TrieNode* root, string word)
{
TrieNode* node=root;
Expand All @@ -35,7 +35,7 @@ void addWord(TrieNode* root, string word)
}
```
3. Trie的单词查找。在本题中,只要能追踪到叶子节点 isEnd==true 即说明找到词根
```
```cpp
bool flag = DFS(root,word,0); // 递归调用
bool DFS(TrieNode* root, string word, int k)
Expand Down

0 comments on commit 91e68fa

Please sign in to comment.