posts: trie: add presentation

This commit is contained in:
Bruno BELANYI 2024-06-30 12:36:17 +01:00
parent 8e5ac9d1e6
commit 53b968e36c

View file

@ -21,3 +21,16 @@ structure most often used for string keys.
[wiki]: https://en.wikipedia.org/wiki/Trie [wiki]: https://en.wikipedia.org/wiki/Trie
<!--more--> <!--more-->
## What does it do?
A _Trie_ can be used to map a set of string keys to their corresponding values,
without the need for a hash function. This also means you won't suffer from hash
collisions, though the tree-based structure will probably translate to slower
performance than a good hash table.
A _Trie_ is especially useful to represent a dictionary of words in the case of
spell correction, as it can easily be used to fuzzy match words under a given
edit distance (think [Levenshtein distance])
[Levenshtein distance]: https://en.wikipedia.org/wiki/Levenshtein_distance