#trie #prefix-tree #digital-tree #retrieval-tree

dyn_trie

Dynamic trie is trie capable of mapping any T to any string

6 stable releases

new 1.1.0 Jan 13, 2025
1.0.6 Jan 13, 2025
1.0.5 Dec 15, 2024
1.0.4 Oct 21, 2024
1.0.2 Jul 22, 2024

#1851 in Data structures

Download history 2/week @ 2024-09-17 2/week @ 2024-09-24 1/week @ 2024-10-01 96/week @ 2024-10-15 77/week @ 2024-10-22 5/week @ 2024-10-29 9/week @ 2024-11-05 1/week @ 2024-11-19 103/week @ 2024-12-10 24/week @ 2024-12-17

127 downloads per month

MIT license

18KB
440 lines

Dynamic Trie

Dynamic trie is trie that allows mapping of any T to any string with asymptotical computational complexity based on that of std::collections::HashMap.

Node occurs for each char as defined by Rust language.

let mut trie = Trie::new();

let keyword = Key::new("Keyword").unwrap();
trie.insert(0usize, &keyword);

let key = Key::new("Key").unwrap();
trie.insert(0usize, &key);

assert!(trie.delete(&key).is_ok());
assert!(trie.member(&key).is_none());

No runtime deps