308-203A Introduction to Computing II Lecture 9: Binary Search/Trees

10/18/00


Click here to start


Table of Contents

308-203A Introduction to Computing II Lecture 9: Binary Search/Trees

Binary Search

Binary Search: example

Binary Search: example

Binary Search: example

Pseudocode (recursive)

Recurrence Equation

Trees

Tree nodes

Trees - example

Definitions

Trees - example

Balanced Trees - example

Binary Search Trees

Binary Search Trees

Tree Traversal

Preorder Tree Traversal

Preorder Tree Traversal

Postorder Tree Traversal

Preorder Tree Traversal

Inorder Tree Traversal

Inorder Tree Traversal

Order of Growth

Search

Order of Growth?

Order of Growth?

Insertion of a new node

Insertion - example

Insertion

Any questions?

Author: Alfred Holz

Email: wrenne@acm.org

Home Page: http://www.cs.mcgill.ca/~cs203