Deletes a single word from the trie.

trie_delete(trie, word_to_delete)

Arguments

trie

A trie.

word_to_delete

The word to be deleted from the trie.

Value

a logical indicating that if the deletion is successful or not. Returns FALSE if the word to delete is not in the trie.

Examples

trie <- trie_create() trie_delete(trie, "test")
#> [1] FALSE