Update for 30-03-22 21:15
This commit is contained in:
parent
e25068812b
commit
04646eb7e1
BIN
Ideas.md.gpg
BIN
Ideas.md.gpg
Binary file not shown.
@ -15,6 +15,7 @@ Different ways to store and operate on data, with differing efficiency
|
||||
== Non sequential Data Structures ==
|
||||
|
||||
* [[binary_tree|Binary Tree]]
|
||||
* [[trie|Trie]]
|
||||
* [[graph|Graph]]
|
||||
* [[b_tree|B-Tree]]
|
||||
* [[red_black_tree|Red Black Tree]]
|
||||
|
18
tech/trie.wiki
Normal file
18
tech/trie.wiki
Normal file
@ -0,0 +1,18 @@
|
||||
= Trie =
|
||||
|
||||
A trie (pronounced "tree"), aka digital tree or prefix tree, is a type of
|
||||
search tree used for locating keys within a set. The keys are usually strings,
|
||||
however any datatype can be used. To find a key, the tree is traveresed
|
||||
using [[DFS]].
|
||||
|
||||
Nodes in a trie can have any number of children, and only leaves actually store
|
||||
their values. Each child node stores another more specific permutation of the
|
||||
current node's key, unless it is a leaf.
|
||||
|
||||
== Operations ==
|
||||
|
||||
M is the length of a key
|
||||
|
||||
| Insertion | O(M) |
|
||||
| Deletion | O(M) |
|
||||
| Search | O(M) |
|
Loading…
Reference in New Issue
Block a user