CS141 Lab 5
For the labs of the fifth week:
-
Go over the first homework solutions, focusing on some selected questions. FYI, Q1-2 were graded by Wilson and Q3-5 by Bob.
-
Review binary tree traversal definitions.
Go over Ex. 4 in Levitin, p. 143.
Show the (recursive) algorithm for preorder treversal
using the binary tree data structure on p. 35 of Levitin.
-
Review Strassen's integer and matrix multiplication algorithms.
Go over Ex. 2 and Ex. 7 in Levitin, pp. 148-149, and show how
many scalar multiplications have been saved.
-
In-lab exercise: Write a C++ program for inorder binary tree
traversal.
TA: If necessary, show students the C++ code segments for dealing with
the binary tree data structure. Keep track of who completed the exercise.
-
For keen students:
Ex. 7 in Levitin, p. 143.