Study Guide — final CS260 — Data Structures

Rules

You may bring, by way of a cribsheet, a single 8.5 &mult; 11 piece of paper, hand-written, double-sided. This should be for quick reference only. If you're looking at the paper for inspiration, you're probably thinking a little wrong. We're looking for your brain, not a parakeet.

Please turn all cell phones off (unless you are expecting a child). You may not talk on the phone, nor text during the exam. You may not use a calculator, nor any other device. No headphones/music, either.

Remember, where we ask for an algorithm, we also want you to provide some run-time analysis.

There are (roughly) 130 points that you may attempt on this exam. Only the first 100 of them will do you any good. The short of this is that you don't need to finish the whole thing. Please skim through the questions before you start, to avoid wasting a lot of time on a question that you're just not feeling at that moment.

Topics for Study

• 2-3 Trees

Disjoint Sets

• Merge-Find (MF) Sets

Graphs

• Discovery:
• Depth-First Search
• Single-Source Shortest Path (SSSP):
• For unweighted graph, use BFS
• For weighted graph, use Dijkstra
• All-Pairs Shortest Path:
• Run Dijkstra ||V|| times
• Floyd-Warshall
• Minimal Spanning Trees:

Remember the greedy algorithm. 2 implementations:

• Prim
• Kruskal
• Depth-First Search
• Label edges (back, forward, cross, tree)
• Check for Cycles
• Find Strongly-Connected Components
• Dependency Graphs:
• Get a Topological Ordering
• SSSP - Just run Dijkstra, using the topological sort, rather than updating a PQ
• Critical Path
• Bipartite Matching
• Augmenting Paths

Sorts & Searches

• Insertion Sort
• Selection Sort
• Merge Sort
• Quick Sort
• Heap Sort