hw3 - CSCI 4041: Algorithms and Data Structures (Fall09)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI 4041: Algorithms and Data Structures (Fall’09) Homework 3, Due 11/10/09 Answer all of the following questions, and always explain your answer. Good Luck! 1. (30 points) This questions considers operations and properties of Binary Search Trees (BSTs): (a) (15 points) Prove that no matter what node we start at in a height- h BST, k successive calls to TREE-SUCCESSOR will take O ( k + h ) time. (b) (15 points) Professor Tree thinks he has discovered a remarkable property of BSTs. Suppose that the search for key k in a binary search tree ends up in a leaf. Consider three sets: A , the keys to the left of the search path; B , the keys on the search path; and C , the keys to the right of the search path. Professor Tree claims that any three keys a A , b B , and c C must satisfy a b c . Give a simple counterexample to the professor’s claim. 2. (40 points) Suppose you are taking n courses, each with a final project that still needs to be completed. Each project will be scored using an integer on a scale of
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

hw3 - CSCI 4041: Algorithms and Data Structures (Fall09)...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online