Below are links to the programming assignments. For each assignment, the assignment entry contains the programming assignment specification; the checklist entry points to clarifications, test data, and hints that might be helpful in completing the assignment; the submit entry links to the electronic submission system; and the collaboration entry specifies the collaboration policy. Once the assignment moves above the "Assignments below have not yet been updated for Spring 2014" part of the table, no significant changes will be made.
|2||Tue 2/18||Deques and Randomized Queues||checklist||video||submit||partner|
|4||Tue 3/4||8 Puzzle||checklist||video||submit||partner|
|7||Tue 4/8||Seam Carving||checklist||video
|8||Tue 4/22||Burrows Wheeler||checklist||compressing
Submission policy. You must submit your solutions electronically via the Dropbox submission system, using your Princeton netID and password for authentication. Be sure to include your name, login, and precept number at the top of every file you submit in the prescribed format. Also be sure to click the Check All Submitted Files button: it checks the header, compiles your files, runs a battery of unit tests, and reports the results. If you do not follow these instructions, you risk losing a substantial number of points.
You can resubmit and unsubmit files as needed up until the submission deadline. However, you may click the Check All Submitted Files button at most 10 times per assignment (at which point the button will be disabled). Also, once the submission deadline passes, you do not resubmit or unsubmit files: if you wish to submit an assignment late, be sure that your submission directory is empty from the deadline until you are ready to submit all of your files for that assignment. Any files submitted at grading time will be graded as is.
If you are working with a parnter, only one partner (with the other partner present)
submits the code and readme.txt; the other partner submits only an abbreviated
readme.txt that contains both partners' names, logins, and precepts.
Coursera policy. You are not permitted to use the Coursera autograders from Algorithms, Part I or II. Countermeasures are in place.
Lateness policy. Programming assignments are due at 11pm on the date specified, with a 3-hour grace period. Late assignments are assessed a 4-point penalty per day or partial day: 0–3 hours late (no penalty), 3–27 hours late (4 points), 27–51 hours late (8 points), and so forth. Your first 16 lateness points are automatically waived. No additional lateness points will be waived without the recommendation of a Dean or a letter from McCosh Health Center.
Your code will be graded for correctness, efficiency, clarity,
and style (including comments).
It is your responsibility to describe how you have completed the
in the submission, not ours to glean this information from your code.
Partial credit is available for a partially
complete assignment; just explain the situation in your
Collaboration policy. This course permits many forms of collaboration, including including help from course staff, classmates, and lab TAs. However, you must be careful to collaborate only as authorized below.
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 private Piazza posts. Do not post or email us your code; instead, submit it via the course submission system.
Collaboration with classmates. We encourage you to discuss common concerns with classmates either via personal interactions or the Piazza course forum. These discussions must be kept at a general level, without exposing your solutions. For example, you may ask about:
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 in a previous offering. 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 one classmate. In such cases, both students must work together (in the same room) and discuss, write, debug, test, analyze, document, and submit all elements of the assignment together. Both partners are responsible for understanding all parts of the submitted assignment and receive the same grade. If two students begin working on an assignment as partners and cannot complete it together, (at least) one student must contact the lead preceptor to request a partnership dissolution.
Collaboration with yourself. If you took COS 226 (or Algorithms, Part I or II from Coursera) during a previous offering, then you may use your solutions from that offering provided that you composed those solutions individually.
Collaboration on extra credit. Some assignments have optional extra credit parts. Extra credit has stricter collaboration rules. You may not discuss extra credit, even conceptually, with anyone other than course staff. On extra credit in assignments where partnering is permitted, you may choose to do the extra credit either separately or together. You must decide this before you begin the extra credit.
Collaboration acknowledgement. You must acknowledge any collaboration (whether authorized or unauthorized) in the readme.txt file for that week's assignment. Using and acknowledging unauthorized collaboration will typically result in a grade of 0 for the assignment (but no further penalty).
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 assignments, checklists, lecture slides, lecture videos, and precept handouts). If you do so, you must cite any code that you copy or adapt. Below is a sample citation:
However, you do not need to cite any code included in either the assignment specification or checklist.// The formula below comes from "Luminance.java" on the booksite, // http://introcs.cs.princeton.edu/java/31datatype/Luminance.java.html return .299*r + .587*g + .114*b;
Plagiarism. Programming is a creative work and the academic regulations that apply to plagiarizing text also apply to plagiarizing code. Rights, Rules, and Responsibilities defines plagiarism as "the use of any work, published or unpublished, by any person other than the student 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 detect plagiarism and our teaching staff takes the issue very seriously.
Penalties. We refer alleged academic violations (including plagiarism and abetting plagiarism) to the Committee on Discipline. If found responsible, the typical penalty is an F as a course grade 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 0 on the assignment to an F in the course.