Deleting a trie

Mar 19, 2016 at 9:32pm
There's plenty of help online for how to delete an entire binary search tree, but none for deleting a trie. I understand how to do it when all you have is a left and a right node, but how do you do it when each node has a vector of children? I can get it to delete one branch, but not the rest. Can anyone explain in words how the deletion should work?
Last edited on Mar 19, 2016 at 11:01pm
Mar 19, 2016 at 10:30pm
> I understand how to do it when all you have is a left and a right node
explain it

> I can get it to delete one branch, but not the rest.
so you've got code, your code doesn't work but you would not post it.
great decision.
Mar 19, 2016 at 11:02pm
Geez, no need to be rude. I just wanted an explanation of how to delete a trie structure, so there's no need for me to post code.
Mar 20, 2016 at 12:59am
I understand how to do it when all you have is a left and a right node, but how do you do it when each node has a vector of children?

The same way you do it when you have a left and a right node (which you say you understand,) except you obviously have more children to process.


I just wanted an explanation of how to delete a trie structure, so there's no need for me to post code.

You have an explanation. If you can't get your code to work, you may wish to post it to get more specific remarks.
Topic archived. No new replies allowed.