Today will be devoted to review for the midterm on Wednesday. The exam rules will be: no notes, no book, no gadgets. Because of the larger class size, our exam format will have to be somewhat easier to grade than the example midterms from earlier years. So expect more fill-in-the-blank or multiple-choice, and less free-response. Indeed, my grading for this class is getting out of hand, I'll try to get it under control during break. A few files to help with your review: summary of materials to review (../0302/review.txt) solutions to the written homeworks (hw*-sol.txt), I could go over some of those today if you like. midterm from 2009 (../0302/mid-2009.pdf), not so relevant because of a largely different list of topics midterm from 2008 (mid-2008.pdf), see the hashing question, we could go over that. I have my usual office hours today (1-3pm), and I'm also willing to answer review questions by email. I'll forward any of those to the class mailing list. Programming examples, if they appear on the exam at all, will be from the textbook rather than homeworks (so I am not releasing solutions to the homework programs). However, as an exception, I'd like to point out one thing from hw3: how to modify DFS to compute sz[v], the size of the DFS subtree at each v: // Supposing pre[v]==-1 when v is not yet seen. void dfs(Graph G, int v) { pre[v] = cnt++; // pre order label for (int w : G.adj(v)) if (pre[w] == -1) dfs(G, w); sz[v] = cnt - pre[v]; // size of subtree at v // post[v] = cnt-1; // post order label }