January 10, 2025 |32.2K Views

    Trie - Delete

      Share  1 Like
    Description
    Discussion

    During delete operation we delete the key in bottom up manner using recursion. The following are possible conditions when deleting key from trie,

    Key may not be there in trie. Delete operation should not modify trie.
    Key present as unique key (no part of key contains another key (prefix), nor the key itself is prefix of another key in trie). Delete all the nodes.

    Trie - Delete: https://www.geeksforgeeks.org/trie-delete/