EBoard 35: Trees
Approximate overview
Lab
Preliminaries
- Introduce yourself to your partners.
- Install the new CSC-151 package.
- Review code.
During lab
Packages
Make sure you install the new CSC-151 package!
Data abstraction and the leaf procedure.
Do trees have to be represented as lists?
What happens if we write this and then switch reps?
(define leaf
(lambda (val)
(list val (empty-tree) (empty-tree))))
leaf is no longer correct
We can avoid that problem by using binary-tree instead of list.
We should also think about using section.
Exercise 4 Error
There’s a subtle issue in the traverse code in exercise 4.
Please change bt-traverse to traverse.
Also do so in exercise 5.
Post lab
Exercise 6 is optional.
Administrative stuff
Introductory notes
- Apologies for this morning. The day did not start well for me.
- It seems like it did not start well for many of you.
- Apologies for the overly-difficult MP7. We’ll be revising the
grading scale to permit one I (other than MP8).
- Yes, we have class on Wednesday. However, if you’d prefer to do
the lab on your own, you may do so.
- Please let me know if you intend to make this choice.
- On Wednesday, I will ask each group to quicky describe their planned
project. Please be ready!
Upcoming activities
Token Events
- Learning from CS Alumni, Tuesday, 2-4pm, William Rebelsky ‘17
- CS grad school (w/o a CS undergraduate degree)
- Finding Jobs & Internships, Part 2, Tuesday Nov. 23 at 7pm
- Finding Jobs & Internships, Part 3, Tuesday Nov. 30 at 7pm
- December 3 or 4: Vocal recital with one of your peers. Stay tuned.
(We hope our colleague will stay in tune.)
Upcoming work
Q&A
Can I really look at the source code for all of the CSC151 package?
Yup. I’ll warn you that much of it uses an old documentation style.