diff --git a/tries/README.md b/tries/README.md index cdb5338..a922179 100644 --- a/tries/README.md +++ b/tries/README.md @@ -3,15 +3,23 @@
* 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. + * 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. + * 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). + * tries structures can be represented by arrays and maps or trees.
+---- + ### insertion
@@ -21,6 +29,9 @@
+ +--- + ### search