CS302 -- Lecture Notes
First, see
http://www.cppreference.com/ or
www.cplusplus.com
excellent
sources of online reference and tutorial material for C++. If you need a
book to help you with C++, try
"Teach Yourself C++", 3rd Ed., Herbert Schildt." -- one cent from Amazon.
If you want a good vi cheat sheet, try http://www.tuxfiles.org/linuxhelp/vimcheat.html.
- In the first part of the class, we review the basics of C++ plus the standard template
library. For reference material, please see the relevant lecture notes
for CS140, where are in http://web.eecs.utk.edu/~plank/plank/classes/cs140/lecture_notes.html.
- Using upper_bound and lower_bound in maps. Evaluating the "Lucky Loser" Keno bet.
- Recursion review, including the Sudoku solver.
- Enumeration.
- A tour de force of sorting algorithms.
- Disjoint sets.
- Priority Queues (Heaps).
- Graph Intro, generating random graphs, depth first search.
- Breadth-First Search, Shortest Paths and Dijkstra's Algorithm.
- Network Flow: Maximum Flows, Minimum Cuts, Residual Graphs, The Edmonds-Karp Algorithm.
- Network Flow: Programming it all up.
- The Minimum Spanning Tree Problem,
Prim's Algorithm and
Kruskal's Algorithm.
- Dynamic Programming.
- Topological Sort. You need to know
the first algorithm and its running time: O(|V|+|E|). Be able to program it.
Here's the example graph we used in class, of the CS prereq structure, which
you process using a topological sort. Also, here is the example topcoder problem that we went over in class.
- The Halting Problem and NP Completeness .