From 053b365f2422c319162f841ab93d3c7bbd6c7a20 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Sat, 14 Apr 2018 09:59:33 +0300 Subject: [PATCH] Add README. --- src/data-structures/trie/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/data-structures/trie/README.md diff --git a/src/data-structures/trie/README.md b/src/data-structures/trie/README.md new file mode 100644 index 000000000..0cae22ba0 --- /dev/null +++ b/src/data-structures/trie/README.md @@ -0,0 +1,22 @@ +# Trie + +In computer science, a trie, also called digital tree and sometimes +radix tree or prefix tree (as they can be searched by prefixes), +is a kind of search tree—an ordered tree data structure that is +used to store a dynamic set or associative array where the keys +are usually strings. Unlike a binary search tree, no node in the +tree stores the key associated with that node; instead, its +position in the tree defines the key with which it is associated. +All the descendants of a node have a common prefix of the string +associated with that node, and the root is associated with the +empty string. Values are not necessarily associated with every +node. Rather, values tend only to be associated with leaves, +and with some inner nodes that correspond to keys of interest. +For the space-optimized presentation of prefix tree, see compact +prefix tree. + +![Trie](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg) + +## References + +[Wikipedia](https://en.wikipedia.org/wiki/Trie)