Computer Science 226
Algorithms and Data Structures
Fall 2014


Course Information | Lectures | Flipped | Assignments | Exercises | Exams

PROGRAMMING ASSIGNMENTS

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 Fall 2014" part of the table, no significant changes will be made.

# DUE ASSIGNMENT SPEC CHECKLIST VIDEO SUBMIT COLLAB COMPETITION RESULTS
1 Wed 9/17 Percolation checklist overview submitindividual
2 Wed 9/24 Deques and Randomized Queues checklist overview submitpartner
3 Wed 10/1 Autocomplete checklist overview submitpartner
4 Wed 10/8 8 Puzzle checklist overview submitpartnersubmitleaderboard
5 Wed 10/15 Kd-Trees checklist overview
worksheet
coding tips
submitpartnersubmitleaderboard
6 Wed 11/12 WordNet checklist overview submitpartnersubmitleaderboard
7 Wed 11/19 Seam Carving checklist overview
research
submitpartner
8 Wed 12/10 Burrows Wheeler checklist compressing
expanding
submitpartnersubmitleaderboard


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). After the deadline, we will grade all submissions that include a readme.txt file. So, if you wish to submit an assignment late, do not submit the readme.txt file until you are ready to have your assignment graded.

If you are working with a partner, 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.

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; however, you are welcome to use it as a guide for evaluating the performance of your program.

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.

Grading policy.  Your code will be graded for correctness, efficiency, clarity, and style (including comments). It is your responsibility to describe how you have completed the assignment 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 readme.txt file.

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. Here is an executive summary.

activity your partner course staff COS 226 grads clasmates 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.

These rules continue to apply even after the semester is over.

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:

But, for example, 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 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. There is one exception—you may discuss your solutions with course staff in office hours, even if one partner is unable to attend. 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 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:

// 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;
However, you do not need to cite any code included in either the assignment specification or checklist.

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.