Loading RustViz Engine...
Implement a Trie with insert, search, and starts_with using Boxed nodes.
This problem is currently in blueprint template mode. Once the concept foundation is finalized, live in-browser WebAssembly compilation and test assertion runners will be enabled here.
#[derive(Default)]
pub struct TrieNode {
children: [Option<Box<TrieNode>>; 26],
is_terminal: bool,
}
pub struct Trie {
root: TrieNode,
}
impl Trie {
pub fn new() -> Self { Self { root: TrieNode::default() } }
}