Find the average number of comparisons done to search for


Question: a. Given the data

9, 5, 6, 2, 4, 7

construct the binary search tree. What is the depth of the tree?

b. Find the average number of comparisons done to search for an item that is known to be in the list using binary tree search on the tree of part (a). (Hint: Find the number of comparisons for each of the items.)

2. a. Given the data

g, d, r, s, b, q, c, m

construct the binary search tree. What is the depth of the tree?

b. Find the average number of comparisons done to search for an item that is known to be in the list using binary tree search on the tree of part (a). (Hint: Find the number of comparisons for each of the items.)

Solution Preview :

Prepared by a verified Expert
Database Management System: Find the average number of comparisons done to search for
Reference No:- TGS02432176

Now Priced at $15 (50% Discount)

Recommended (94%)

Rated (4.6/5)