CS1027b Computer Science Fundamentals II

Lab 10

General lab instructions to help labs run smoothly

Upon completion of this lab, you should be able to understand the linked list implementation of the Binary Tree ADT and implement some binary tree operations.

Exercise 1: Understanding the BinaryTreeNode class

Download the file BinaryTreeNode.java. Look at the picture of the BinaryTreeNode in 45 of the lecture notes about trees, and examine the code to see how the node is implemented.

Exercise 2