# hw5 - Homework 5 Time due: 9:00 PM Thursday, June 4 This...

This preview shows pages 1–3. Sign up to view the full content.

Homework 5 Time due: 9:00 PM Thursday, June 4 This homework is a good study guide for the final. The final will be open book, open notes. We don't expect you to memorize every last detail of every algorithm, so a skill you should develop is the ability to locate an algorithm in a reference source, trace through it, and understand it. If it's not in exactly the form your application requires, you should be able to adapt it. 1. Consider the following binary search tree, ordered using the < relationship: a. Using the simplest binary search tree (BST) insertion algorithm (no balancing), show the tree that results after inserting into the above tree the nodes 80, 65, 75, 45, 35 and 25 in that order. (If you're not skilled with a drawing tool, use a simple text form of the tree. For example, the tree depicted above could be shown as b. 50 c. d. 20 60 e. f. 10 40 70 g. h. 30 Use enough space to distinguish left children from right children. Another way to represent the tree in text form is (50 (20 (10) (40 (30) () ) ) (60 () (70) ) )

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
i.
This is the end of the preview. Sign up to access the rest of the document.

## hw5 - Homework 5 Time due: 9:00 PM Thursday, June 4 This...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online