CSC 148 H1, Winter 2013

Lab 8 (Mar. 12/13)

This document contains the instructions for lab number 8 in CSC 148 H1. To earn your lab mark, you must actively participate in the lab.
We mark you in order to ensure a serious attempt at learning, NOT to make careful critical judgments on the results of your work.

General rules

We will use the same general rules as for the first lab (including pair programming). See the instructions at the beginning of Lab 1 to refresh your memory.

Overview

In this lab, you will write two functions that combine working with trees and working with linked lists.

The code you have to write is really quite short and simple, if you see things the right way. So the main goal of this lab is to get you to spend a significant amount of time thinking before you code. Draw lots of pictures, write down high-level outlines of the functions you have to write, make sure you spend a lot of time discussing how to use recursion to accomplish your goals. And in the end, with the help of your partner, other students in your lab, and your TA, you should be able to write the two functions below in no more than about a dozen lines of code (each)!


Inorder Traversal

When you are done, show your work to your TA and switch roles.


Longest Path

When you are done, show your work to your TA. Then, please stick around to help other students in your lab section!