Code is correct but error

Describe your issue

The compilation and logical errors on platform drivers like CodeChef occur because your submission conflicts with the platform’s hidden template file: redefinition errors happen when you re-declare structs like TrieNode or utility functions that are already provided in the hidden header; linker errors arise when the driver’s main() function expects a specific entry-point wrapper like deleteWord() that hasn’t been defined; and logic errors occur when the recursive function isn’t called starting at depth = 0 on the root node, which causes the traversal to miss target paths and leaves the Trie unmodified.

Screenshot

Additional info