Computer Science 331 — Search Trees

Search Tree

Search Trees

Overview

Finite sets and mappings are basic abstract data types with many applications. If the elements of a set, or the keys in a mapping, belong to an ordered set, then additional useful operations can be provided, so that finite ordered sets and dictionaries (ordered mappings) are also heavily used.

Binary trees are extremely useful data structures. If the elements of an ordered set or of a dictionary are stored at nodes, with various ordering properties satisfied,then the resulting binary search trees provide extremely useful implementations.

While binary search trees have very good performance in practice, the worst case running times of operations are not as good. “Height balanced” binary search trees are somewhat more complicated data structures with operations whose worst case performance is within a linear factor of the “expected” performance of the corresponding operations on a regular binary search tree. A red-black tree is one kind of height balanced search tree.

Regular binary search trees and red-black trees will be presented, and their properties will be studied.

Lecture #8: Binary Trees and Binary Search Trees — Definitions and Searches

Required Reading

Lecture Presentation

Code Supplied with This Lecture

Additional Material That May Be of Interest

Lecture #9: Binary Trees and Binary Search Trees — Additional Operations

Required Reading

Lecture Presentation

Code Supplied with This Lecture

Additional Material That May Be of Interest

Reading Exercise #2: Properties of Randomly Constructed Binary Search Trees

Tutorial #9: Binary Search Trees

Lecture #10: Red-Black Trees — Part One

Required Reading

Lecture Presentation

Lecture #11: Red-Black Trees — Part Two

Required Reading

Lecture Presentation

Tutorial #10: Red-Black Trees

Tutorial #11: Augmenting Binary Search Trees and Red-Black Trees

Assignment #2: AVL Trees


University of Calgary Extension of Logo
Department of Computer Science

cpsc 331 computer science faculty of science u of c

cpsc 331 intro and math review analysis of algorithms basic data structures and adts search trees hash tables searching and sorting graph algorithms java develoment exercises assignments tests