Try to solve the first version first and reuse your code.
To implement the delete function, you should delete the trie nodes of the word if they are not shared with other words.
You should keep for each trie node a counter of how many words share this node.