# Lecture Notes for CS 230 - LAB: Data Structures at Wellesley College

## Notes Information

 Material Type: Class Note Professor: Staff Class: CS 230 - LAB: Data Structures Subject: Computer Science University: Wellesley College Term: Spring 2009 Keywords: On the RightOn the LeftBinary SearchBinary Search TreeReturn ResultImplementation

## Sample Document Text

4/14/09 1 17.1 - Binary Search Trees (BSTs) ? A search tree is a tree whose elements are organized to facilitate finding a particular element ? A binary search tree is a binary tree that, for each node n ?? the left subtree of n contains elements less than the element stored in n ?? the right subtree of n contains elements greater than or equal to the element stored in n ? How do you search for an element? ? Binary search trees can hold any type of Comparable data 17.1 - Adding an Element to a BST 77 24 82 58 17 40 97 Next to add: 77 24 58 82 17 40 97 The shape of a binary search tree depends on what? 17.1 - Degenerate Tree ?A grossly unbalanced tree, with some long paths ?When does it occur? ?Why is it undesirable? 17.1 - Removing an Element from a BST ? Removing a target in a BST is not as simple as that for linear data structures ? After removing the element, the resulting tree must still be valid ? What if you remove 88? ...

## Related Documents

On the Right Notes
On the Left Notes
On the Left Notes
On the Left Notes
On the Left Notes
On the Left Notes
On the Right Notes
On the Left Exam
On the Left Notes
On the Left Notes
On the Left Notes
On the Right Notes
On the Right Exam
Binary Search Notes
On the Left Notes
On the Right Notes