Data Structures & Algorithms final exam study sheet
A data structures final asks you to pick the right structure, state its running time, and show an operation by hand: insert into a heap, run BFS from a vertex, trace a partition. Midterms usually stop at lists, stacks, queues, and the first trees. The final is usually cumulative, but the graph material and anything after it tends to get the most points because it has not been tested yet.
Whether your course calls it a formula sheet, a crib sheet, or an aid sheet, the useful version is the same: one page of running times, invariants, and hand-trace procedures.
Cheat sheet locked
The scope
What this exam usually covers
These are the problem types a data structures final commonly grades; your course's language and textbook will change the details.
- Asymptotic analysis Give a tight big-O for nested loops and recursive code, and rank growth rates. Points are lost on loops that halve (log n, not n) and on treating amortized dynamic-array append as O(n) each.
- Lists, stacks, and queues Array versus linked implementations, which operations are O(1) at which end, and using a stack for bracket matching or a queue for level-order traversal.
- Hash tables Chaining versus open addressing, load factor, and inserting a short sequence of keys by hand with linear probing. Deletion under open addressing needs tombstones, a common short-answer question.
- Binary search trees and balance Insert and delete by hand, including the two-child delete with the in-order successor. Know why an unbalanced BST degrades to O(n); some courses add AVL or red-black rotations.
- Heaps and priority queues Array index formulas for parent and children, sift-up and sift-down traces, and building a heap in O(n). Students lose marks by drawing a valid BST instead of a valid heap.
- Graphs and traversals Adjacency list versus matrix and their space costs, BFS and DFS orders from a given start with a given neighbour order, and topological sort on a DAG.
- Shortest paths and MSTs Run Dijkstra by hand with a table of distances, and say why it fails with negative edges. Many courses also cover Prim and Kruskal for minimum spanning trees.
- Sorting and recursion Best, average, and worst case for insertion, merge, quick, and heap sort, which are stable, and recurrences like T(n) = 2T(n/2) + n solved by the master theorem.
Usually later
Dynamic programming, the master theorem, balanced-tree rotations, and minimum spanning trees are core in some courses and absent in others. NP-completeness and amortized analysis proofs usually belong to a later algorithms course. Check the review sheet for which of these your final includes, and the related sorting library sheet if sorting is a large part of it.
The rules
What a note sheet is usually allowed to include
check your exam header — it wins
Data structures finals are one of the computing exams most likely to allow a note sheet, often one letter-size page, sometimes front and back, sometimes handwritten only. Others are closed-notes and expect you to know running times cold, and a few give a provided table of complexities. Canadian courses tend to call it an aid sheet; UK modules a crib sheet. The syllabus wins. This page is a study sheet either way: a running-time table you built yourself is easier to remember than one you copied.
The sheet
The matching library sheet
A one-page reference for the whole topic, fact-checked, with the first part free to read. This exam page does not repeat it. Use it to see the material, then make a shorter study sheet from the notes your section actually used.
Data Structures & Algorithms reference sheet — the free part in text.
Unlock the full reference sheet to edit, print or save it as a PDF.
Make your own for this exam
Upload the lecture slides and the problem sets for every unit the final covers, then in the focus step name what the review session stressed, such as Dijkstra traces or heap operations. Pick one page, front and back, or an index card to match your course's rule.
FAQ
Questions
- What goes on a data structures crib sheet?
- A table of running times for each structure and operation, the heap index formulas, the BST delete cases, BFS and DFS pseudocode, Dijkstra's update rule, and the stability and worst case of each sort. Leave out definitions you already know well.
- Is an aid sheet allowed in a data structures final?
- Often, but not always. One letter page or one side of handwritten notes is a common rule; some finals are closed-notes. The course syllabus or exam instructions decide.
- Is the data structures final cumulative?
- Usually yes, but the material after the last midterm, often graphs and shortest paths, tends to carry more points. Confirm the weighting on your review sheet.
- How is this different from the library sheets?
- The Data Structures & Algorithms library sheet is a full-course reference, and the separate sorting sheet goes deeper on sorting algorithms and recurrences. This page covers what the final usually grades and how to build your own sheet from your notes.