This page contains the programming assignments for this course. The assignment specification describes the technical requirements of the programming assignment; the checklist answers FAQs and provides advice for testing and getting started. Below the list of assignments, you will find the course policies regarding submission, lateness, grading, and collaboration. The assignment FAQ also contains important information common to all programming assignments.
# | DUE | LOGO | ASSIGNMENT | COLLABORATION | LINKS |
---|---|---|---|---|---|
1 | Monday 2/8 |
![]() |
Percolation Estimate the percolation threshold using union–find. |
individual |
Checklist Project Submit! |
2 | Monday 2/15 |
![]() |
Queues Implement two collections using arrays and linked lists. |
individual |
Checklist Project Submit! |
3 | Monday 3/1 |
![]() |
Slider Puzzle Solve a slider puzzle using the A* search algorithm. |
partner |
Checklist Project Submit! Leaderboard |
4 | Monday 3/8 |
![]() |
K-d Trees Implement k-d trees with nearest neighbor search. |
partner |
Checklist Project Submit! Leaderboard |
5 | Monday 3/29 |
![]() |
WordNet Measure the relatedness of two nouns using the WordNet digraph. |
partner |
Checklist Project Submit! Leaderboard |
6 | Monday 4/12 |
![]() |
Seam Carving Implement a content-aware image resizing algorithm. |
partner |
Checklist Project Submit! Leaderboard |
7 | Monday 4/26 |
![]() |
Burrows–Wheeler Implement the Burrows–Wheeler algorithm for data compression. |
partner |
Checklist Project Submit! Leaderboard |
Submission policy.
Submit your solutions electronically via the TigerFile submission system,
using your Princeton NetID and password for authentication.
Include your name, NetID, and precept number at the top of every
file you submit.
You may resubmit files without penalty up until the submission deadline.
Submitting with a partner. On assignments that permit working with a partner, you must register your partnership in TigerFile. Either partner may submit files. Both partners receive the same score.
Check all submitted files. Clicking the Check All Submitted Files button checks the header, compiles your files, runs a battery of unit tests, and reports the results. You may click this button at most 10 times per assignment; if you are working with a partner, this limit applies to the group.
Late submissions. Assignments are due at 11pm ET on Monday evenings, with a 1-hour grace period. If any part of an assignment is submitted late, the entire assignment will be marked late.
To submit an assignment late, mark the checkbox in TigerFile that indicates that your work is incomplete. If the deadline has passed and the checkbox is unmarked, we will grade any submitted work as-is.
Penalties for late submissions. Late assignments are assessed a penalty equal to 10% of the possible points on the assignment per day (or partial day) late. The penalties for your first four late days are waived automatically. Additional late penalties will be waived only in the case of a medical or personal emergency, as documented by your residential college.
If you are working with a partner, any late penalties apply to the group. The number of free late days a group can use is the minimum of the number of free late days each member has remaining.
Penalties for submission mistakes. If you make a submission mistake, you can request a regrade with a penalty of 10%. Examples of submission mistakes include: submitting an incorrect version of a file, forgetting to submit the readme.txt file, listing the wrong partner name or NetID, and forgetting to mark the "I am NOT Done" checkbox.
Extra credit. Some assignments have (optional) parts designated as extra credit. The policies for submission and collaboration are the same as for the required parts of the assignment.
Classwide competitions.
On some assignments, you may (optionally) submit your code to a classwide
competition. We will time your programs and display the results in a
public leaderboard. To enter the competition, submit your code
along with a file nickname.txt. Whatever
you put in nickname.txt will be used as your alias in the leaderboard.
There is no official reward for doing well in the competition.
Coursera policy. You are not permitted to use the Coursera autograders from Algorithms, Part I or II.
Grading policy.
Your code will be graded for correctness, efficiency, clarity, and style.
It is your responsibility to describe how you have completed the
assignment, not ours to glean this information from your code.
Partial credit is available for a partially
complete assignment (provided that the code compiles); just explain the situation in your
readme.txt
file.
Graded work will be returned electronically
through codePost.
Collaboration policy. This course permits and encourages many forms of collaboration, including from course staff, classmates, and lab TAs. However, you must be careful to collaborate only as authorized below. Here is an executive summary.
activity | your partner | course staff | COS 226 grads | class-mates | other |
---|---|---|---|---|---|
discuss concepts with ... | ✔ | ✔ | ✔ | ✔ | ✔ |
acknowledge collaboration with ... |
✔ | ✔ | ✔ | ✔ | ✔ |
expose solutions to ... | ✔ | ✔ | ✔ | no | no |
view solutions from ... | ✔ | no | no | no | no |
plagiarize code from ... | no | no | no | no | no |
Your solutions. You must individually compose all of your solutions. The term solutions refers to any of the products created when completing a programming assignment, such as source code (including comments) and the readme.txt file. It includes both finished and unfinished products, regardless of correctness or completeness.
Collaboration with course staff. You are welcome to discuss your solutions with course staff members (instructor and preceptors) in office hours or via a private post in the course discussion forum. Do not post or email us your code; instead, submit it via TigerFile.
Collaboration with classmates. We encourage you to discuss common concerns with classmates either privately via personal interactions or publicly in the course discussion forum. These discussions must be kept at a general level, without exposing your solutions.
For example, you may discuss: | But, you may not: |
---|---|
|
|
Collaboration with COS 226 graduates (including lab TAs and peer tutors). You are permitted to show your solutions to anyone who has successfully completed COS 226. So, for example, you may receive help from lab TAs in debugging your code. Of course, you must still individually compose your solutions. So, for example, you may not allow another individual to write, type, or dictate code; lead you step-by-step through any part of the assignment; or communicate solutions (including their solutions from a previous offering). Other individuals may help you under these same conditions, provided they are not taking COS 226 now and never will in the future.
Collaboration with a partner. On those programming assignments designated as partner, the collaboration policy is relaxed to permit working with a classmate, subject to the following rules:
Collaboration with yourself. If you took COS 226 (or Algorithms, Part I or II from Coursera) during a previous offering, you may refer to your old programming assignment only if you wrote all of the code on your own in the previous offering (and you are not working with a partner in this offering). Though, in our experience, students who re-do all of the assignments from scratch are much more likely to succeed in the course, so this is what we strongly recommend.
Collaboration acknowledgement. You must acknowledge all collaboration in the readme.txt file for that week’s assignment.
Outside sources and citations. Copying or adapting code that is not yours is permitted only if it comes from the course materials (i.e., the course textbook, companion booksite, programming assignment specifications, checklists, lecture slides, lecture videos, and precepts). You must cite any code that you copy or adapt; the only exception to this rule is for code that appears in the assignment specification or checklist, which you may use without citation.
Plagiarism. Programming is a creative work and the academic regulations that apply to plagiarizing prose also apply to plagiarizing code. Rights, Rules, and Responsibilities defines plagiarism as “the use of any outside source without proper acknowledgment.” It ranges from “verbatim copying” (e.g., cutting-and-pasting code) to “thorough paraphrasing” (e.g., changing variable names or rearranging code). We use sophisticated tools to flag similar programs and our teaching staff takes the issue very seriously.
Regret clause. If you plagiarize code on a programming assignment in this course, you may resubmit the assignment (via email to the course instructor), adding proper acknowledgments. If you do so, you will receive a 0 on the assignment (for violating course policies). However, with proper acknowledgments, this would not be plagiarism, so we would not initiate a CoD case. Once a case has been submitted to the CoD, the matter is outside of our control and the regret clause cannot be invoked.
Penalties. We refer alleged academic violations (including plagiarism and abetting plagiarism) to the Faculty–Student Committee on Discipline. If found responsible, the typical penalty is no credit for the work in question plus whatever penalty that the CoD imposes. (The typical CoD penalty for plagiarism is suspension from the University for one year.) Violators of course policies that are not adjudicated by the CoD will receive penalties based on the severity of the violation, ranging from a warning (for violations that are both unintentional and innocuous) to an F in the course (for violations that are both willful and serious).