COSC 350: Data Structures
April 20, 2009


Binary Search Trees Revisited

Draw, Search, Create (Insert Node), Delete Node

Balancing Trees

Need to balance: Ideal performance vs. Actual performance
Rotate left and rotate right

Homework

Wednesday, April 22:

1. For the data: 5,1,9,3,7,2,4,8

a) Build the binary search tree from the data in the order as given.
b) Show the tree in part a after rotating root with left subtree.
c) Show the tree in part a after rotating root with right subtree.

Friday, April 24:

Implement Heap Sort in Python. Be sure to demonstrate your code. (Counts as two routine homework assignments.

 


This page was created by Joe Sloan.
It was last modified on or after: 17 April 2009
Send mail to: sloanjd@wofford.edu