MT2 Info
Spring 2026 Canary: The following information HAS NOW been updated for Spring 2026!
Overview and Process
The test will be IN PERSON
- Time/Date: 7pm-8:40pm Feb 26th
- The test will be set for 1 hour, 30 minutes
- If you have USC approved accommodations, you must upload your accomodation information HERE 7 days before the exam, otherwise you will not be able to use your accommodations.
-
Location: THH 101 & 102
- If you have OSAS accommodations you should schedule your exam at the OSAS offices on Thursday during OSAS hours
- The test will be taken on paper. Be prepared a pencil/pen.
- The exam is Closed book, Closed notes, Closed Internet (search/reference). You may use your mind, and blank scratch paper but nothing else. No referencing your labs, homeworks, etc.
Topics and Style
The exam is a mix of short answer, multiple choice, analysis, tracing, and coding. We will visually grade your code and be fairly lenient with small syntax errors (e.g. a missing semicolon).
Unit 7 - Queues and Stack
- Implementation options and their efficiency
- ArrayBased list implementations (resizing and its runtime)
- Queue, stack and deque implementations
- Applications of queues and stacks
Unit 8 - Templates
- Process for defining templated classes
- Basic rules for templates and inheritance
- Functors
Unit 9 - PQ and Heaps
- Tree representations and storage
- Full, complete, and balanced tree definitions
- Implementation of a priority queue
- Heap implementation and operations (push, pop, top) and runtime
build-heap(make-heap) algorithm and runtime- heap-sort
Unit 10 - Graph Representations and Traversals
- Graph Algorithms
Unit 11 - Recursive Graph & Tree Traversals Algorithms
- Graph Traversals
Unit 12 - Recursion: Combinations & Backtracking
- Recursion
- Combinations & Backtracking
Unit 13 - Iterators
- Iterators
Unit 14 - Binary Search Trees & AVL Trees
- Binary Search Trees
- Balanced Binary Search Trees / AVL Trees
Unit 15 - Splay Trees
- Splay Trees
Practice Materials
Sample Midterms
- Sample Midterm - Solutions
- Copy construction, operator overloading are not a major focus of CS104 but were in previous years.
- Sample Midterm 2 (partial solutions)
- Summer 2020 Midterm (Programming) (no solutions)
- Summer 2021 Midterm (Hybrid)
Practice Quizzes
- ADTs - Solutions
- Streams and Simple Recursion - Solutions
- Runtime and Recursion - [No Solutions]
- Linked Lists and Recursion - Solutions
- Sample Midterm Heap Problems - Solutions
- Sample Midterm 2 (partial solutions)
- Summer 2021 Midterm (Hybrid)
- Lazy-Quicksort - Solutions
Practice Quizzes
- Runtime and Recursion - [No Solutions]
- Linked Lists and Recursion - Solutions
- Build-heap - Solutions