Answered You can hire a professional tutor to get the answer.

QUESTION

Question 1 Develop a program to make an optimal BST by using the technique of dynamic programming . You are required to calculate the "main table"...

Question 1

Develop a program to make an optimal BST by using the technique of dynamic programming . You are required to calculate the "main table" and "root table". After creating the tree, the program prompts the user to enter a word (key) and searches the tree for the word. Whenever the program compares user input K with word W at node V , it displays word W and the minimum average number of comparisons of the subtree rooted at V . If the program fails to find the input in the tree, it displays "not found" after comparisons.

Question 2

Develop a program to make an optimal BST by using the greedy technique. After creating the tree, the program prompts the user to enter a word (key) and searches the tree for the word. Whenever the program compares user input K with word W at node V , it displays word W and the probability of W. If the program fails to find the input in the tree, it displays "not found" after comparisons.

A data file is given.

I would appreciate any !

Thank you.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question