Comp 271-400 Week 6
Lewis Tower 415, 4:15-8:15
Welcome
Readings:
Bailey chapter 6, sorting: selection sort, insertion
sort, mergesort, quicksort.
Morin chapter 1, sections 1.1 and 1.2
One slight peculiarity of Morin is
that he refers to the array-based List implementation of chapter 2 as an
ArrayStack.
Lab 6
get(k)
Recursion and expressions
Compare
expr ::= term { addop term }
with the parse-only code:
public long
exprEval() {
termEval();
while (is_addop(theToken) {
theToken =
t.token();
termEval();
}
}
There's a certain similarity!
Finish Traversers
Start with AltStack
Queues
Objects
Zuul
Tree
Rotations
B-Trees