Description Usage Arguments Value Examples
Each node's formal name is a single character. You can traverse to the node of a key in the trie by splitting a key into characters and then traverseing from parent to child node. This is really just a helper function.
1 | key_traverse(key, trie)
|
key |
the key to search for |
trie |
the trie to search for |
the trie node that corresponds to the key
1 2 3 4 5 6 | test <- c("a", "ab", "bab", "bc", "bca", "c", "caa", "abc")
values <- c("foo", "bar", "foo", "bar", "foo", "bar", "foo", "bar")
example_trie <- trie_create(test, value = values)
key_traverse("c", example_trie)
key_traverse("ca", example_trie)
key_traverse("caa", example_trie)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.