You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Trie class provides basic functionality for inserting, deleting, and searching for strings. However, it lacks several useful features that could make it more versatile and powerful. This issue proposes adding the following new features to the Trie class:
Count of Words in the Trie: A method to count the total number of words inserted into the trie.
Longest Common Prefix: A method to find the longest common prefix among all the words in the trie.
Autocomplete: A method to provide autocomplete suggestions based on a given prefix.
Bulk Insert: A method to insert multiple words at once.
Clear Trie: A method to clear the entire trie, removing all words.
Check if Trie is Empty: A method to check if the trie is empty.
Find All Words: A method to retrieve all words stored in the trie.
Find the Shortest Unique Prefix: A method to find the shortest unique prefix for each word in the trie.
Check if Any Word Starts with a Given Prefix: A method to check if any word in the trie starts with a given prefix.
Find the Longest Word in the Trie: A method to find the longest word stored in the trie.
The text was updated successfully, but these errors were encountered:
Add New Features to the Trie Class
Description
The current
Trie
class provides basic functionality for inserting, deleting, and searching for strings. However, it lacks several useful features that could make it more versatile and powerful. This issue proposes adding the following new features to theTrie
class:The text was updated successfully, but these errors were encountered: