Comp 388-005 Week 4
Lewis Tower 410, 4:15-8:15
Readings:
Bailey chapter 6, on Sorting
Sorting notes
Recursion notes
Quicksort: sorting.html#quicksort.
bailey_partition()
morin_partition()
space complexity: see lists.html#space,
the Table of Factors example.
List expand() and time-v-space tradeoffs
Binary trees
demo programs: inttree.cs,
In-class lab:
- get intraverse() to print in the other order, so that, turned on its
side, the output looks like a tree
- Try some random data-insertion orders.
Some ways to traverse a tree: traversers.cs
- traversal
- building
- ordered
- binary search trees
- versus hash tables
- recursive operations
- sum
- max
- depth
- search
- insert
Study guide
Lab 4