6.006 students submitted their solutions using Gradetacular, which is not available through MIT OpenCourseWare. The solutions below contain all of the test data used by 6.006 staff, so you can use these files to grade your own code.

In order to use the ZIP files, you will need the programs described in the Software section. Some problem sets also contain additional installation instructions in the README.txt files. LaTeX templates are also included; see the Related Resources for suggested editors.

1 Asymptotic complexity, recurrence relations, peak finding

Problem Set 1 (PDF)

Problem Set 1 Code (ZIP)

Problem Set 1 Solutions (PDF)
2 Fractal rendering, digital circuit simulation

Problem Set 2 (PDF)

Problem Set 2 Code (ZIP)

Problem Set 2 Solutions (PDF)

Problem Set 2 Code Solutions (ZIP - 7.7MB)

3 Range queries, digital circuit layout

Problem Set 3 (PDF)

Problem Set 3 Code (ZIP - 3.2MB)

Problem Set 3 Solutions (PDF)

Problem Set 3 Code Solutions (ZIP - 15.7MB)

4 Hash functions, Python dictionaries, matching DNA sequences

Problem Set 4 (PDF)

Problem Set 4 Code (GZ - 12.4MB) ( courtesy of Kevin Kelley, and used with permission.)

Problem Set 4 Solutions (PDF)

Problem Set 4 Code Solutions (ZIP)

5 The Knight’s Shield, RSA public key encryption, image decryption

Problem Set 5 (PDF)

Problem Set 5 Code (ZIP)

Problem Set 5 Grading Explanation (PDF)

Problem Set 5 Solutions (PDF)

Problem Set 5 Code Solutions (ZIP)

6 Social networks, Rubik’s Cube, Dijkstra

Problem Set 6 (PDF)

Problem Set 6 Code (ZIP - 2.9MB) ( courtesy of Punyashloka Biswal and Michael Lieberman; Pocket Cube Solver courtesy of Huan Liu and Anh Nguyen. Used with permission.)

Problem Set 6 Solutions (PDF)

Problem Set 6 Code Solutions (ZIP)

7 Seam carving, stock purchasing and knapsack

Problem Set 7 (PDF)

Seam Carving for Content-Aware Image Resizing

Problem Set 7 Code (ZIP) (Sunset image © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see

Problem Set 7 Answer Template (ZIP)

Problem Set 7 Grading Explanation (PDF)

Problem Set 7 Solutions (PDF)

Problem Set 7 Code Solutions (ZIP)

Course Info

Learning Resource Types

theaters Lecture Videos
theaters Recitation Videos
assignment_turned_in Problem Sets with Solutions
grading Exams with Solutions
assignment_turned_in Programming Assignments with Examples
notes Lecture Notes