Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ please implement a function for dictionary class using binary search tree that has the word and its meaning, i have the BST code

in c++ please image text in transcribed
implement a function for dictionary class using binary search tree that has the word and its meaning, i have the BST code and nodes written i need the functions which are: 1)insert: that takes the word and meaning as strings, if the word is already in the dictionary the meaning is replaced with the new one. if tge word given is an empty string it does nothing. worst case running time is O (height). 2)shortest_word: that returns the shortest word in the dictionary and returns an empty string if the dictionary is empty. worst case running time is O(1). 3) longest_word: that returns the longest word in the dictionary and an empty string if empty. worst case running time is O(1). 4)clean: that removes every word whose meaning is an empty string. worst case running time is O(n). 5)words_beginning_with: that takes a character and counts and returns the number of word that begin with the given character. worst case running time is O (height +k). we can add new data members to the class dictionary and new private functions if needed. thank you in advance, please submit the most efficient work it would mean a lot, thanks again

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions