The textbook is a good place to start for reviewing what we've done
this term. Take a look at Chapter 15, especially.
Errata: in table 15.3 (p. 725, in ch. 15), the "comparison"
column values are only within that class of algorithm, not for
all sorts. (Thus, insertion sort is "good" only by
comparison with the other N2 sorts).
Here are some smaller things we have not done,
for one reason or another. You do not have to worry about them as
you study for the final. (page references are to the
beginning of the topic)
p. 151 turning infix into postfix
p. 262 Anagrams
p. 294 Simulating recursion
p. 306 Combinations - picking a team
p. 415 Huffman coding
parts of ch. 11 on details of open addressing (but: know basic
idea of open addressing)
p. 725, elsewhere: external storage
Here are some things you might reasonably be
expected to know. For algorithms, make sure you know how
they work -- such that you could explain the action to a friend.
That way, too, you'll know when you might want to use a particular
strategy, and can then go back to find or create the actual code.
Please, also, learn the key vocabulary: it would be difficult to
convince someone you knew how to drive a car if you didn't know what
"speedometer" meant.
Sorting: you should know one of the basic sorts, Insertion
or Selection, cold. Know the big-O values for all major sorts, and
other particularly interesting information. Know the names, and
general idea, of the fast sorts: MergeSort, ShellSort, QuickSort.
Removing duplicates ...
Lists: Be able to name and illustrate principal kinds of
lists: simple, ordered, double-ended, doubly-linked. Be
able to reason about the cost of operations, and how they compare with
corresponding array-based solutions. Be able to add and remove an
item from the front of a simple linked list in your sleep.
How to create stacks and queues, using arrays or lists.
Lists and trees: understand how they look in memory, with
reference links; understand how to traverse them.
Trees: know how to traverse a tree, using a recursive
algorithm. Pre-order, in-order, post-order: what and how.
Binary trees: what is the invariant? How, generally, do things
come and go? Can you say anything about 2-3-4 trees? (Know
that "red-black trees" exist and what they're good for.) (know what a
"heap" is).
Vocabulary: root, parent/child, subtree. As you'll
be moving on to learn about graphs, "node" and "edge" are good terms to
know, too!
Hashing: Be able to describe, generally, what a "hash
function" is, what "open addressing" and "linear probing" is all
about. What is a "load factor" and what kind of values would one
look for -- perhaps different for the two major kinds of hash tables.
Recursion: runs through many areas. For a good
introduction/review, take a look at triangle numbers (around p. 254).
Binary search, power, knapsack are good algorithms to understand.
Consider problem 6.1 (multiplication)
Traversing a recursive data structure: you should be able
to do simple traversals without error: count, print ...
Be able to check two lists or trees for equality. For
simple equality, you can stop when a difference is found. Here's
a slightly harder problem: for the List/Sublist structure, take
two lists; print the differences you find, and what level they
occur on. ("at level 4, left arg has "apple", right arg has
"(core)" ")