MT1 Info
Spring 2024 Canary: The following information HAS NOW been updated for Spring 2024!
Overview and Process
The test will be IN PERSON
- Time/Date: Fri, Oct 4 at 7 PM Pacific
- The test will be set for 1 hour, 40 minutes
-
If you have USC approved accommodations, you must upload your accomodation information HERE.
- If you have OSAS accomodations you should schedule your exam at the OSAS offices on Friday, ending at 5pm (closing time)
- The test will be taken on paper and uploaded to Gradescope. Be prepared with 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.
- You are allowed 1 8.5x11 (front and back) notes sheet.
Topics and Style
The exam is a mix of short answer, multiple choice, and coding snippets. We will visually grade your code snipets and be fairly lenient with small syntax errors (e.g. a missing semicolon).
Unit 2a-2f - Review of CS 103 and CS 170
- Memory allocation (when to use dynamic allocation)
- Scope and lifetime of variables
- Pointers, references
- Classes (access modifiers), construction, destructions, initialization lists, use of
const
) - Operator overloading
- Runtime (you’ll probably want your basic series formulas on your cheat sheet)
- Linked lists
- Copy Constructors / Assignment Operators / Rule of 3.
Unit 3 - Recursion
- Simple recursion
- Tracing of recursive functions
- Understanding order of execution (head vs. tail recursion)
- Linked list recursion
Unit 4 - ADTS
- List, Set, Map, Priority Queue, Queue, Stack
- When to use each given a problem description
Unit 5 - STL
- Iterators and their use
std::map
usage
Unit 6 - Inheritance and Polymorphism
- Order or construction/destruction of parent/child classes
- Public, private, protected members
- Public, private, protected inheritance
- Inheritance vs. Composition relationships (
is-a
vs.has-a
) virtual
functions (static vs. dynamic binding)- Abstract classes and pure virtual functions
- Tracing of polymorphic code execution
- Class hierarchy and design
Unit 7 - Queues and Stack
- Implementation options and their efficiency
- Applications of queues and stacks
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
- heap-sort
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) [AC: This is not as relevant for the current semester, but still excellent practice]
- Summer 2021 Midterm (Hybrid) [AC: This gets into material that will be on the final but not MT1]
Practice Quizzes
- ADTs - Solutions
- Streams and Simple Recursion - Solutions
- Runtime and Recursion - [No Solutions]
- Linked Lists and Recursion - Solutions
- Build-heap - Solutions [AC: Not covered this semester]