Question: Implement Trie - II Problem Statement: Implement a data structure TRIE from scratch. Complete some functions. Trie ( ) : Initialize the object of this

Implement Trie - II
Problem Statement: Implement a data structure "TRIE" from scratch. Complete some functions.
Trie(): Initialize the object of this "TRIE" data structure.
insert("WORD"): Insert the string "WORD" into this "TRIE" data structure.
countWordsEqualTo("WORD"): Return how many times this "WORD" is present in this "TRIE".
countWordsStartingWith("PREFIX"): Return how many words are there in this "TRIE" that have the string "PREFIX" as a
prefix.
erase("WORD"): Delete this string "WORD" from the "TRIE".
 Implement Trie - II Problem Statement: Implement a data structure "TRIE"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!