mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-30 04:36:08 -04:00
Update README.md
This commit is contained in:
parent
fd5bbaee8d
commit
fb7059d0e6
@ -3,15 +3,23 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
* tries, also called prefix tree, are a variant of n-ary tree in which characters are stored in each node.
|
* tries, also called prefix tree, are a variant of n-ary tree in which characters are stored in each node.
|
||||||
|
|
||||||
* each trie node represents a string (a prefix) and each path down the tree represents a word. note that not all the strings represented by trie nodes are meaningful.
|
* each trie node represents a string (a prefix) and each path down the tree represents a word. note that not all the strings represented by trie nodes are meaningful.
|
||||||
|
|
||||||
* the root is associated with the empty string.
|
* the root is associated with the empty string.
|
||||||
|
|
||||||
* the * nodes (null nodes) are often used to indicate complete words (usually represented by a special type of child) or a boolean flag that terminates the parent node.
|
* the * nodes (null nodes) are often used to indicate complete words (usually represented by a special type of child) or a boolean flag that terminates the parent node.
|
||||||
|
|
||||||
* a node can have anywhere from 1 through alphabet_size + 1 child.
|
* a node can have anywhere from 1 through alphabet_size + 1 child.
|
||||||
|
|
||||||
* can be used to store the entire english language for quick prefix lookup (O(k), where k is the length of the string). they are also widely used on autocompletes, spell checkers, and ip routing (longest prefix matching).
|
* can be used to store the entire english language for quick prefix lookup (O(k), where k is the length of the string). they are also widely used on autocompletes, spell checkers, and ip routing (longest prefix matching).
|
||||||
|
|
||||||
* tries structures can be represented by arrays and maps or trees.
|
* tries structures can be represented by arrays and maps or trees.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
### insertion
|
### insertion
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -21,6 +29,9 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### search
|
### search
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user