Question: Build a binary search tree for the following words, sorted alphabetically: gaffe, rebellion, fool, elaborate, spread, joke, freedom, stroke, guideline, and aware. Add words to

Build a binary search tree for the following words, sorted alphabetically: gaffe, rebellion, fool, elaborate, spread, joke, freedom, stroke, guideline, and aware. Add words to this tree in the order in which they are listed.
(a) How many comparisons are needed to locate spread in this tree, starting from the top?
(b) How many comparisons are needed to add the word thorough to this tree?
(c) What is the parent of the node labeled elaborate?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!