CS 15-122: Principles of Imperative Computation
(Spring 2025)

Course Material and Assessments  [  Course material  |  Assessments  ]

Course Material[–]

Lecture Notes
Part 1: Deliberate Programming
  1. Contracts code slides
  2. Ints code slides
  3. Arrays code slides
  4. Searching Arrays code slides
  5. Big-O code slides
  6. Binary Search code slides
  7. Quicksort code slides
Part 2: Data Structures
  1. Libraries code slides
  2. Stacks and Queues code slides
  3. Linked Lists code slides
  4. Unbounded Arrays code slides
  5. Hashing code slides
  6. Hash Dictionaries code slides
     codevoid* slides
  7. Genericity code slides
     codefunction pointers slides
  8. Binary Search Trees code slides
  9. AVL Trees code slides
Part 3: Transitioning to C
  1. Introduction to C code slides
  2. C's Memory Model code slides
  3. Types in C code slides
  4. Virtual Machines code slides
  5. Graph Representation code slides
  6. Graph Search code slides
  7. Spanning Trees code slides
  8. Union-Find code slides
  9. Priority Queues code slides
  10. Restoring Invariants code slides
Guides to Success
Part 1: Using Office Hours Effectively
Part 2: Infrastructure
Part 3: General Tips and Tricks
Part 4: Debugging C0 Code
Part 5: Debugging C Code
Practice Exams
Final published by Wed 23 Apr

Assessments[–]

Assessments will become visible on their release date. Precept solutions will become visible 24 hours after the precepts themselves. Make sure to refresh your browser to see them!

Practice Problems
  • PP Sample (UNGRADED)
  • PP 00solutions
  • PP 01solutions
  • PP 02solutions
  • PP 03solutions
  • PP 04solutions
  • PP 05solutions
  • PP 06solutions
  • PP 07solutions
  • PP 08solutions
  • PP 09solutions
  • PP 10
Extra Practice Problems
  • EP 01solutions
  • EP 02solutions
  • EP 03solutions
  • EP 04solutions
  • EP 05solutions
  • EP 06solutions
  • EP 07solutions
  • EP 08solutions
  • EP 09solutions
  • EP 10
Checkins
  • CH 01solutions
  • CH 02solutions
  • CH 03solutions
  • CH 04solutions
  • CH 05solutions
  • CH 06solutions
  • CH 07solutions
  • CH 08solutions
  • CH 09solutions
Programming Assignments
  • Sample Assignment (UNGRADED)
  • Scavenger Hunt
  • Pixels
  • Images
  • Dos Lingos
  • Exp
  • Text buffers
  • Bloom Filters
  • Ropes
  • String Buffers
  • Lights Out
Precepts
  1. What's the Point?solutions
  2. int-eresting!solutions
  3. Hip Hip Array!solutions
  4. Fancy Partitionsolutions
  5. Point me to Safetysolutions
  6. Link it all Togethersolutions
  7. Everything Hash to Gosolutions
  8. Generally Speakingsolutions
  9. Rotating Rotationssolutions
  10. C-ing is Believingsolutions

Miscellaneous[–]

Start of Semester
  • Setup Lab

2025 Iliano Cervesato iliano@cmu.edu