Skip to content

Commit 28109b4

Browse files
committedAug 19, 2022
Update Trie image.
1 parent ad2f49a commit 28109b4

File tree

5 files changed

+25
-17
lines changed

5 files changed

+25
-17
lines changed
 

‎src/data-structures/trie/README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@ _Read this in other languages:_
55
[_Русский_](README.ru-RU.md),
66
[_Português_](README.pt-BR.md)
77

8-
In computer science, a **trie**, also called digital tree and sometimes
9-
radix tree or prefix tree (as they can be searched by prefixes),
10-
is a kind of search tree—an ordered tree data structure that is
11-
used to store a dynamic set or associative array where the keys
12-
are usually strings. Unlike a binary search tree, no node in the
13-
tree stores the key associated with that node; instead, its
8+
In computer science, a **trie**, also called digital tree and sometimes
9+
radix tree or prefix tree (as they can be searched by prefixes),
10+
is a kind of search tree—an ordered tree data structure that is
11+
used to store a dynamic set or associative array where the keys
12+
are usually strings. Unlike a binary search tree, no node in the
13+
tree stores the key associated with that node; instead, its
1414
position in the tree defines the key with which it is associated.
1515
All the descendants of a node have a common prefix of the string
16-
associated with that node, and the root is associated with the
17-
empty string. Values are not necessarily associated with every
18-
node. Rather, values tend only to be associated with leaves,
19-
and with some inner nodes that correspond to keys of interest.
20-
For the space-optimized presentation of prefix tree, see compact
16+
associated with that node, and the root is associated with the
17+
empty string. Values are not necessarily associated with every
18+
node. Rather, values tend only to be associated with leaves,
19+
and with some inner nodes that correspond to keys of interest.
20+
For the space-optimized presentation of prefix tree, see compact
2121
prefix tree.
2222

23-
![Trie](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg)
23+
![Trie](./images/trie.jpg)
24+
25+
*Made with [okso.app](https://okso.app)*
2426

2527
## References
2628

‎src/data-structures/trie/README.pt-BR.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Na ciência da computação, uma **trie**, também chamada de árvore digital (digital tree)
44
e algumas vezes de _radix tree_ ou _prefix tree_ (tendo em vista que eles
55
podem ser pesquisados por prefixos), é um tipo de árvore de pesquisa, uma
6-
uma estrutura de dados de árvore ordenada que é usado para armazenar um
6+
uma estrutura de dados de árvore ordenada que é usado para armazenar um
77
conjunto dinâmico ou matriz associativa onde as chaves são geralmente _strings_.
88
Ao contrário de uma árvore de pesquisa binária (binary search tree),
99
nenhum nó na árvore armazena a chave associada a esse nó; em vez disso,
@@ -17,7 +17,9 @@ internos que correspondem a chaves de interesse.
1717
Para a apresentação otimizada do espaço da árvore de prefixo (_prefix tree_),
1818
veja árvore de prefixo compacto.
1919

20-
![Trie](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg)
20+
![Trie](./images/trie.jpg)
21+
22+
*Made with [okso.app](https://okso.app)*
2123

2224
## Referências
2325

‎src/data-structures/trie/README.ru-RU.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
дополнительную информацию, связанную с ключом, и обычно выделенными являются только листья и, возможно, некоторые
1717
внутренние узлы.
1818

19-
![Префиксное дерево](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg)
19+
![Префиксное дерево](./images/trie.jpg)
20+
21+
*Made with [okso.app](https://okso.app)*
2022

2123
На рисунке представлено префиксное дерево, содержащее ключи «A», «to», «tea», «ted», «ten», «i», «in», «inn».
2224

‎src/data-structures/trie/README.zh-CN.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
在计算机科学中, **字典树(trie,中文又被称为”单词查找树“或 ”键树“)**, 也称为数字树,有时候也被称为基数树或前缀树(因为它们可以通过前缀搜索),它是一种搜索树--一种已排序的数据结构,通常用于存储动态集或键为字符串的关联数组。
44

5-
与二叉搜索树不同, 树上没有节点存储与该节点关联的键; 相反,节点在树上的位置定义了与之关联的键。一个节点的全部后代节点都有一个与该节点关联的通用的字符串前缀, 与根节点关联的是空字符串。
5+
与二叉搜索树不同, 树上没有节点存储与该节点关联的键; 相反,节点在树上的位置定义了与之关联的键。一个节点的全部后代节点都有一个与该节点关联的通用的字符串前缀, 与根节点关联的是空字符串。
66

77
值对于字典树中关联的节点来说,不是必需的,相反,值往往和相关的叶子相关,以及与一些键相关的内部节点相关。
88

99
有关字典树的空间优化示意,请参阅紧凑前缀树
1010

11-
![Trie](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg)
11+
![Trie](./images/trie.jpg)
12+
13+
*Made with [okso.app](https://okso.app)*
1214

1315
## 参考
1416

131 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.