Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++, meet all the grading criteria, thank you! Create a Trie data structure used to keep track of various words. Grading Criteria Implementation o

image text in transcribed

Using C++, meet all the grading criteria, thank you!

Create a Trie data structure used to keep track of various words. Grading Criteria Implementation o [5 Points] Trie data structure Value of root will be empty string (how many child nodes are possible?) o [5 Points] Insert() accepts a word as an argument and adds only the necessary letters into the Trie o Remove accepts a word and [2 Points] removes only the necessary letters from the Trie (What if the word is a substring? E.g. "cat" and "catalyst") [3 Points] removes only whole words that can be identified from the Trie (i.e. don't allow removal of only "intr" when there are "intrinsic" or "intricate" etc.) o [2 Points] Find() accepts a word and determines whether the word exists o [3 Points] Recommend accepts a substring and lists all the possible words that can follow the substring according to the data in the Trie o [5 Points] GetAllWords(returns all available words in the Trie o [3 Points] Ability to identify substrings that are whole words, e.g. "comic", "comical", "comically", etc. Demonstration o [3 Points] Insert at least 10 words and demonstrate it is properly added o [1 Point] Demonstrate calling remove() on a word that doesn't exist o [1 Point] Demonstrate find( on an incomplete substring (e.g. "mi" - what should happen? Should this automatically call Recommend?) o [2 Point] Demonstrate calling GetAllWords and then removing all strings in the Trie Create a Trie data structure used to keep track of various words. Grading Criteria Implementation o [5 Points] Trie data structure Value of root will be empty string (how many child nodes are possible?) o [5 Points] Insert() accepts a word as an argument and adds only the necessary letters into the Trie o Remove accepts a word and [2 Points] removes only the necessary letters from the Trie (What if the word is a substring? E.g. "cat" and "catalyst") [3 Points] removes only whole words that can be identified from the Trie (i.e. don't allow removal of only "intr" when there are "intrinsic" or "intricate" etc.) o [2 Points] Find() accepts a word and determines whether the word exists o [3 Points] Recommend accepts a substring and lists all the possible words that can follow the substring according to the data in the Trie o [5 Points] GetAllWords(returns all available words in the Trie o [3 Points] Ability to identify substrings that are whole words, e.g. "comic", "comical", "comically", etc. Demonstration o [3 Points] Insert at least 10 words and demonstrate it is properly added o [1 Point] Demonstrate calling remove() on a word that doesn't exist o [1 Point] Demonstrate find( on an incomplete substring (e.g. "mi" - what should happen? Should this automatically call Recommend?) o [2 Point] Demonstrate calling GetAllWords and then removing all strings in the Trie

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions