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.
insertWORD: Insert the string "WORD" into this "TRIE" data structure.
countWordsEqualToWORD: Return how many times this "WORD" is present in this "TRIE".
countWordsStartingWithPREFIX: Return how many words are there in this "TRIE" that have the string "PREFIX" as a
prefix.
eraseWORD: Delete this string "WORD" from the "TRIE".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
