Medium Accuracy: 29.21%
Submissions: 4024 Points: 4
Trie is an efficient information retrieval data structure. This data structure is used to store Strings and search strings, String stored can also be deleted. Given a Trie root for a larger string super and a string key, delete all the occurences of key in the Trie.
N = 8
super = "the a there answer any by bye their"
key = "the"
Complete the function deleteKey() to delete the given string key.The String key if exists in the larger string super, must be deleted from Trie root. The larger string super contains space separated small strings. And if the string is deleted successfully than 1 will be printed.
If any other string other than String A is deleted, you will get wrong answer.