Module: Trees

Introduction to the Tree ADT.

Dates: Sat, Apr 2 - Sat, Apr 16

Learning Outcomes

Learn about and implement the Tree data structure

The student will:

Understand recursion and how to develop recursive algorithms and programs

The student will:

Learn about and implement pre-order, in-order, and post-order traversals

The student will:

Readings

Text: 6.1 - 6.2

Trees and Traversals

SC: Tree ADT

An introduction to the Tree ADT.

Text: 6.3 & 6.5

Binary Trees

SC: Binary Trees and Binary Search Trees

Implementation of Binary Tree and Binary Search Tree.

Text: 6.7

Huffman Trees

SC: Huffman Trees and Codes

Introduction to Huffman Trees.

SC: Binary Data and Java

Dealing with binary data in Java.

Text: 6.6

Heaps and Priority Queues

SC: Heaps and Priority Queues

Introduction and Implementation of a Heap and Priority Queue.

Experiential Learning

Binary Tree Traversal Practice Quiz

Write an in-order toString() method for a Binary Tree.

BinarySearchTree Practice Quiz

Write the find() method for a BinarySearchTree.

Practice: Binary Tree Traversal

More Binary Tree Traversals.

Practice: Binary Trees

Working with Binary Trees

Array based BinarySearchTree Practice Quiz

Write the insert() method for a BinarySearchTree.

H10: Sort by using a Binary Search Tree

Implement a BinarySearchTree and use it to sort Cheese.

Practice: Binary Search Tree

Deleting from a Binary Search Tree.

Practice: Heaps

Building and maintain a heap.

H11: Huffman Trees

Implement Huffman encoding using a Huffman Tree.