Midterm 1 Simulation

6 real past exams · 7 questions each · 70 minutes

These are the actual exam questions from past Midterm 1 exams. Write your solutions on paper just like the real exam, then grade yourself using the provided rubric and solution guide.

Sample Midterm
70 min

Sample Midterm 1

The original practice exam provided by the course. Covers Big-O, DP, DFS, BFS, graph modeling, and Dijkstra.

Q1: Big-OQ2: Dynamic ProgrammingQ3: DFSQ4: BFSQ5: GreedyQ6: Dijkstra's AlgorithmQ7: Dynamic Programming
Midterm 1
70 min

Midterm 1 (2023)

The actual first midterm exam. Big-O proof, DP knapsack variant, DFS on directed graph, DAG longest path, Dijkstra Q table, and more.

Q1: Big-OQ2: Dynamic ProgrammingQ3: DFSQ4: DAG Shortest/Longest PathsQ5: Dijkstra's AlgorithmQ6: Dijkstra's AlgorithmQ7: Dynamic Programming
Midterm 1 Repeat
70 min

Midterm 1 Repeat (2023)

The repeat exam for Midterm 1. Big-O proof by contradiction, BFS jump problem, DFS degree analysis, DAG shortest path, Dijkstra with parameter x.

Q1: Big-OQ2: BFSQ3: DFSQ4: DAG Shortest/Longest PathsQ5: Dijkstra's AlgorithmQ6: Dijkstra's AlgorithmQ7: Dynamic Programming
Sample Midterm 2024
90 min

Sample Midterm 1 (2024)

The 2024 practice exam for Midterm 1. Covers piecewise Big-O, DP max product subarray, DFS tree edge analysis, BFS colorful paths, festival scheduling as DAG, Dijkstra Q table reconstruction, and DP replace + with *.

Q1: Big-OQ2: Dynamic ProgrammingQ3: DFSQ4: BFSQ5: GreedyQ6: Dijkstra's AlgorithmQ7: Dynamic Programming
Sample Midterm 2
90 min

Sample Midterm 2

The practice exam for Midterm 2. Covers heap operations, finding pairs with difference 42, BST from preorder, 2-3 tree sequential insertion proof, coNP (DEG4SPANNING-TREE), NP-completeness reduction (kINDPDT-SET-CLIQUE), and middle-number data structure with two heaps.

Q1: HeapsQ2: SortingQ3: Binary Search TreesQ4: 2-3 TreesQ5: Complexity Theory (coNP)Q6: Complexity Theory (NP-completeness)Q7: Data Structures
Sample Midterm 2 RBT
90 min

Sample Midterm 2 (RBT variant)

A variant of the Sample Midterm 2 where Q2 (difference-42 problem) is replaced with a Red-Black tree insertion problem. All other questions remain the same.

Q1: HeapsQ2: Red-Black TreesQ3: Binary Search TreesQ4: 2-3 TreesQ5: Complexity Theory (coNP)Q6: Complexity Theory (NP-completeness)Q7: Data Structures

How It Works

  • - Each exam has 7 questions worth 10 points each (70 total)
  • - Questions are open-ended: proofs, algorithm design, tracing algorithms
  • - Write your answers on paper or in the text field, just like the real exam
  • - When done, submit and grade yourself using the rubric for each question
  • - The solution guide shows the expected approach and key steps