Skip to content

Commit 053b365

Browse files
committed
Add README.
1 parent 8efebc1 commit 053b365

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/data-structures/trie/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Trie
2+
3+
In computer science, a trie, also called digital tree and sometimes
4+
radix tree or prefix tree (as they can be searched by prefixes),
5+
is a kind of search tree—an ordered tree data structure that is
6+
used to store a dynamic set or associative array where the keys
7+
are usually strings. Unlike a binary search tree, no node in the
8+
tree stores the key associated with that node; instead, its
9+
position in the tree defines the key with which it is associated.
10+
All the descendants of a node have a common prefix of the string
11+
associated with that node, and the root is associated with the
12+
empty string. Values are not necessarily associated with every
13+
node. Rather, values tend only to be associated with leaves,
14+
and with some inner nodes that correspond to keys of interest.
15+
For the space-optimized presentation of prefix tree, see compact
16+
prefix tree.
17+
18+
![Trie](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg)
19+
20+
## References
21+
22+
[Wikipedia](https://en.wikipedia.org/wiki/Trie)

0 commit comments

Comments
 (0)