CSCI 241 - Data Structures

Scott Wehrwein

Fall 2020

Course Overview

Remote Instruction Policies

Lectures

The Lecture component of this course is “flipped”. For most class periods, you will do the following:

  1. Before a given class period, watch the (usually 3) pre-recorded lecture videos.
  2. After each lecture video, complete a short set of Exercises to test your understanding of the new content.
  3. Most of class time will be spent in groups. At the beginning of class, you will compare Exercise answsers with other members of your group, compiling your solutions into a single group-wide solution set. Questions and clarifications on exercises will be discussed as a whole class.
  4. The remainder of class time will be spent working on a sequence of Problems which require you to apply and extend the concepts from the lecture videos.

Lecture videos will be posted on YouTube and linked from the Schedule table, alongside the Exercises, Problems, and optional readings for each class period. Synchonous class meetings will take place at the scheduled time using Discord. See the Logistics section below for details on Discord and how to participate in class.

Labs

Labs will be self-paced. Lab assignments will be released on Monday of each week and due Sunday night. Synchronous TA help (office hours) will be available during the regularly scheduled lab periods.

The lab times are essentially TA office hours: you can go to either lab for help regardless of which section you’re in, and you are free to ask for help on any aspect of the course (not just the lab assignments).

Quizzes and Exams

Quizzes and exams will be distributed and submitted using an online tool called Gradescope (see the Logistics section for details). You will be able to take a quiz or exam anytime within a specified window of time (e.g., 10AM to 10PM for quizzes), with a time limit imposed (e.g., 15 minutes for quizzes). Exams will be similar, but with different time limits and time windows, to be announced at least a week before the exam.

Office hours

Office hours will be held by me and the TAs over Zoom (subject to change - we may switch to Discord instead). The Zoom links will be posted on the Syllabus page of Canvas.

Flexibility and Accommodations

The ongoing challenges associated with the current state of the world are affecting all of us in complex and varied ways. Although I have done my best to design this course to allow for flexibility, I understand that individual students may have circumstances that make it difficult to fully participate in this course.

If you contact me and ask, I will always make reasonable accommodations for late assignments and labs, missed classes, etc. Exceptions include:

The key thing to keep in mind, especially with respect to the programming assignments, is that the deadlines are primarily there for you: to make sure you stay on top of the material enough to get everything done by the end of the course.

The flip side of all this is that if you don’t talk to me, I can’t help you. I am making an effort to be transparent about accommodations because I don’t want them denied to those who are too shy to ask, or don’t ask because they assume I won’t be flexible.

What

Synopsis from the WWU Course Catalog

Design and implementation of hash tables, general trees, search trees, balanced trees and graphs. Comparison of sorting algorithms. Demonstration of the use of data structures in various applications. Evaluation of the best data structure for a particular task. Programming is required in implementation of concepts.

Official Course Outcomes

At the end of this course, students will have:

Why

The goal of this course is to round out your knowledge of the fundamental data structures and algorithms that comprise the basic toolbox of a computer scientist or software developer. Along the way, we’ll encounter and develop the following big ideas that permeate many more advanced subfields of computer science:

By the end of this course, students should be able to:

Textbooks

The following texts may serve as useful references, but are not required:

Assessment

Interim Grading Policy

The University’s Fall 2020 interim grading policy applies. In contrast to Spring 2020, you can opt-in for P/NP grading. Also unlike Spring 2020, you must make this choice via the registrar by the end of the 7th week of classes.

Two important caveats to the official grading policy apply to this course:

  1. For this course to count towards entry into the Computer Science major, you must take it for a letter grade. If you opt for P/NP and wish to apply for the CS major, you would need to re-take the course.
  2. The University’s cutoff for a P grade is D+ and above, whereas the department’s cutoff is C- and above. In this course, no D+ grades will be assigned. Any score below a C- and above an F will receive a D.

Grade Breakdown

Grades will be calculated as a weighted average of scores on the following course components, each of which is described in more detail below:

In this class we follow the notational convention that a range of integers denoted a..b describes the range beginning at (and including) a up to but not including b (this is consistent with Python’s range function). For example, 1..4 describes the range including 1, 2, and 3 but not 4. The floor function truncates the decimal part of a floating-point value (that is, rounds down to the nearest smaller integer). Final letter grades will be assigned as follows.

floor(%) Grade
 ≥ 90 A range
80..90 B range
70..80 C range
60..70 D
0..60 F

The calculated raw percentages may be curved nonlinearly at the instructor’s discretion, but any such curve used will not reduce anyone’s grade. “+” or “-” cutoffs will be decided at the instructor’s discretion.

If you opt-in for P/NP grading, the boundary between Pass and No Pass is 70.0. Students who demonstrate mastery of the material will get grades in the A range, and it is my goal to give as many A’s as possible.

Programming Assignments

Four programming assignments will be given to provide practice implementing the major concepts covered in the course:

Resubmissions

You may resubmit any programming assignment (i.e., A1, A2, A3, A4) within two weeks of when grades are released (or the day of the final exam, whichever is earlier) to earn back up to half of the unit test points you lost. Only unit test points can be earned back. When you resubmit, you must send me an email to let me know that you have done so.

Extra Credit: Test Suite Gaps

In any of the programming assignments where unit tests are provided, you can earn extra credit if you discover a gap in my test suite. Specifically, if you discover that your implementation passes the provided test cases up to and including the tests for a given method but that method still has a bug, you can earn up to 3 points of extra credit for providing a correct test case that catches the bug.

If you find such a bug and wish to earn extra credit:

  1. With the bug present in your solution code, Create a testing branch in your repository (git checkout -b testing).
  2. Modify the appropriate testing class to include your additional test case. When this test file is run, your test should be the only one up to that point in the test file that fails (unrelated tests from later in the assignment may fail as well).
  3. Commit your test file changes and push your testing branch to github and send me an email me with a detailed description of the bug and the test you’ve written.

You can send your test case in anytime starting before the assignment is completed (create your testing branch then simply swich back to master, fix the bug, and continue on) up until 5pm on the last day of classes.

Labs

Weekly labs will provide hands-on experience with auxiliary topics as well as time for work on programming assignments with the TA available to answer questions during the lab period. To get full credit for a lab activity you must submit the deliverable by the deadline, which is 10:00pm on Sunday of the week the lab is assigned.

Quizzes

Weekly quizzes will be given on Fridays and will be taken via Gradescope (see the Logistics section for details), with a time limit but available to be taken anytime during the day between 10AM and 10PM. I have a strict policy against makeup quizzes, but your lowest quiz grade is dropped. If some special circumstances cause you to miss taking more than one quiz, please talk to me.

Midterm Exam

The midterm exam will be delivered via Gradescope on Friday, October 30th. Like the quizzes, it will be taken using Gradescope.

Final Exam

The final exam is scheduled for Tuesday, December 8th from 3:30 - 5:30 PM. The format of the final will match the midterm, except that the duration is longer. The final exam will be cumulative, but more emphasis will be placed on material covered since the midterm. Per the University Academic Policies, a student who fails to take a final examination without making prior arrangements acceptable to the instructor receives a failing grade for the course.

Lecture Exercises

Before each class, you will watch up to three short videos and work through a set of Exercises that test your understanding of the material from the videos. In class, your team will get together and collaboratively write a solution set in your team’s cumulative Google Doc. The Exercises component of your grade (10%) will be determined by (1) completion of all exercises and (2) correctness of small sampling of the exercises (e.g., one or two per class). Feedback on exercises will be provided in your group’s Google Doc.

Note that the Exercises to be completed before lecture are distinct from Problems, which you will work on in class after finishing your Exercise solution set. Grades will be based only on Exercises, not Problems. The Problems are designed to challenge you, so I do not expect that all groups will be able to finish all of them.

Attendance

At the top of each day’s solution set, you will list the group members present. Up to two unexcused absences are allowed. Beyond that, please contact me and I will grant additional excused abences as needed. Unexcused absences will result in credit deducted from the Lecture Exercises portion of your grade.

Resources for Getting Help and Support

Help with Course Content

If you are stuck, struggling, or need help on any aspect of the course, you have several avenues for seeking help:

Community Office Hours

Faculty Community Ambassador - Moushumi Sharmin

As we navigate this unnatural environment, it is creating a lot of stress and anxiety for many of us. If you want to share your views/concerns/comments related to EID issues, the climate of the department, or just need a space to talk about things that you need someone else to listen to, please feel free to join me in the Community Hours.

This hour is for Students, Faculty, and Staff. The conversations that will happen in the room will be strictly confidential and one-on-one (unless it is previously agreed that a group of individuals want to join at the same time).

Time: Thursdays at 10am (or by appointment)

Zoom link: https://wwu-edu.zoom.us/j/161683671?pwd=anhINUdwRUc1cmdPaTJqSXJMRFl0dz09

Student Community Ambassador - TBD

University Resources

As a reminder, the following University resources are always available:

Logistics

Course Webpage / Syllabus

The Schedule section of this page will be kept up-to-date as the quarter progresses with topics, links to all lecture materials (videos, slides, exercises, problems, and readings), as well as links to assignment and lab handouts. I suggest bookmarking this page; if you forget the URL and need to find your way back here, you can find the link on the Syllabus page in Canvas.

Remote Access to CS Labs

Please see Lab 0, linked from the first day in the Schedule table, for instructions on getting set up to work remotely in the CS lab environment. There is nothing to hand in for this “Lab”, but it is strongly recommended that you get things set up by Sunday, 9/27. If you encounter any problems, please talk to me or a TA for help.

Canvas

We will use Canvas for announcements, assignment invitation links, grades, and some other logistics. Lab and assignment writeups, lecture materials, readings, etc. will all be linked from the course webpage. Numerical grades will be entered into Canvas to track your overall score in the course, but feedback on your assignments will be provided via Gradescope (quizzes and exams) or Git (assignments and labs), as described in the sections below.

Class Meetings - Discord, Google Docs

Remote class meetings will be conduced using Discord. You will work in pre-assigned small groups, collaborating in your own group’s voice channel. Groups will persist across class periods and may be shuffled once or twice throughout the quarter. Your primary task in class is to collectively write up a solution set to the day’s Exercises and as many Problems as you have time to complete. These solution sets will be written in a Google Doc, provided to you via a link pinned in your group’s text channel.

When working in groups, everyone should be present in the voice channel, have a working microphone, and actively participate in constructing your group’s solution set.

In the first class, you will establish further norms for your group, which you can revisit and revise as needed. For example, you may decide that all members having webcams on makes for more natural discussion/collaboration. You are also welcome to find and use any collaboration tools you like in additon to Google Docs. For example, I recommend considering a tool like AWW (a nice web-based collaborative whiteboard app) to create drawings or diagrams to be placed into your Google Doc.

Gradescope

Quizzes and exams will be taken, graded, and returned to you via an online tool called Gradescope. You will receive an email before the first quiz with instructions on how to set a password for the account that has been created for you. Thereafter, you can access quizzes and exams by logging into your account on http://www.gradescope.com.

Git and GitHub

Labs and assignments will be completed using Git repositories hosted by GitHub and orchestrated by GitHub classroom. For each assignment and lab, you will find an invitation link in the assignment page on Canvas. This link will create your private repository where you will complete the assignment in a local copy of the repo, and submit your code by pushing your final changes to GitHub. To complete your submission, you will also fill out a Canvas survey letting me know how many hours you spent on the assignment.

To grade your assignments (and in some cases, labs) Github Classroom automatically creates a feedback branch in your repository and a pull request to merge all the commits you’ve made to master into the feedback branch. This allows us to use Github’s code review tools to give you feedback directly in your repository. To access your feedback, go to your repository on github.com click “Pull Requests” from among the tabs across the top, then click “Feedback” in the list on that page. You should see a log of comments and feedback, including line-by-line comments if we’ve left any.

For the assignments with unit tests, we’ve also set up Github Classroom to automatically run your code on those tests every time you push your changes to github. This is a form of continuous integration testing, which is a fancy term for “run all the tests every time you change anything”. You’ll probably get emails telling you the outcome of the checks (which will only be successful if you pass all tests); I think there’s a way to unsubscribe from them, or you can use an email filter to keep your inbox clutter to a minimum.

Piazza

We will use the online Q&A platform Piazza to ask and answer questions, make clarifications, and discuss supplemental topics outside of class time. You can access our Pizza page here or by logging into Piazza. You will receive an email in the first week of classes with information on how to log in.

Communication

I will make every effort to make all course-related announcements via Canvas. It is your responsibility to make sure that you promptly become aware of Canvas Announcements as they are posted; Canvas should be configured to send you an email notification by default, but if you are unsure, please come see me in office hours.

Feedback

I take student feedback seriously, and I believe it’s especially important this quarter given the remote format and newly-flipped course. I appreciate any feedback you’re willing to give, and I will do my best to act on constructive feedback when possible. I will solicit feedback through surveys periodically throughout the course, but you are welcome and encouraged to provide feedback anytime in my office hours, by email, or if you desire anonymity you can fill out this Google Form.

Schedule

This table contains a schedule of topics and links to all course materials.

Date # Videos Slides E/P Topic Assigned/Due References
9/23 (0) 0 Getting Started Chekclist L00 Problems Intro, logistics Lab 0:
Remote Access
9/25 1 A: 5:18
B: 13:14
C: 9:21
A
B
C
Exercises
Problems
Tools for algorithms, Searching RS 13.2-13.3, CLRS 2.1-2.2
9/28 (1) 2 A: 9:42
B: 10:18
C: 19:13
A
B
C
Exercises
Problems
Runtime analysis Lab 1:
Git, Gradle
vs code tutorial
RS 13.2-13.3, CLRS 2.2
9/30 3 A: 9:45
B: 10:26
C: 15:02
A
B
C
Exercises
Problems
Insertion and selection sort A1 out RS 13.2-13.3, CLRS 2.1-2.2
10/2 4 A: 4:19
B: 8:20
C: 5:14
A
B
C
Exercises
Problems
Recursion Quiz 1 Tutorial: Method execution
RS 12.1-12.3
10/5 (2) 5 A: 6:59
B: 7:15
C: 8:24
A
B
C
Exercises
Problems
MergeSort Lab 2:
Testing
lab2 hashmap hints
RS 13.4, CLRS 2.3
10/7 6 A: 10:42
B: 5:27
C: 6:14
A
B
C
Exercises
Problems
Quicksort, Stability, Space Complexity CLRS 7.1
10/9 7 A: 13:26 A Exercises
Problems
Comparison Sorts
Radix Sort
Quiz 2 CLRS 8.2-8.4
10/12 (3) 8 A: 7:50
B: 4:59
C: 6:10
A
B
C
Exercises
Problems
Trees, Traversals,
Recursion on trees
Lab 3:
Recursion
RS 17.1-17.3
10/14 Buffer Day Fun Buffer day
10/16 9 A: 9:52
B: 8:21
C: 6:44
A
B
C
Exercises
Problems
Binary Search Trees A1 due
Quiz 3
CLRS 12.1-12.3
RS 17.4
10/19 (4) 10 A: 9:54
B: 5:01
C: 9:26
A
B
C
Exercises
Problems
Generics
Tree Rotations
Lab 4: AList
A2 out
CLRS 13.2
10/21 11 A: 6:20
B: 9:19
A
B
Exercises
Problems
AVL Trees Eric Alexander’s AVL Tree Notes
10/23 12 A: 4:31
B: 8:42
C: 3:39
A
B
C
Exercises
Problems
Heaps Quiz 4 RS 18.2; CLRS 6.1-6.3
10/26 (5) 13 (None) (none) (No Exercises)
Problems
Heapsort Lab:
Midterm Review
RS 18.2; CLRS 6.1-6.3
10/28 Buffer day
10/30 Midterm Exam
11/2 (6) 14 A: 3:57
B: 6:23
C: 4:05
L14P.mp4
A
B
C
Exercises
Problems
Hashing 1 Lab 5: Hash functions
A2 Due
A3 out
RS 18.1; CLRS 11.1-3
11/4 15 A: 5:23
B: 3:45
C: 4:16
A
B
C
Exercises
Problems
Hashing 2 CLRS 11.3-4
11/6 16 A: 6:44
B: 4:35
C: 2:13
A
B
C
Exercises
Problems
Graphs: definition, representation CLRS 22.1-2
11/9 (7) 17 A: 6:12
B: 3:05
C: 2:37
L17P
A
B
C
Exercises
Problems
Graph traversals Lab 6:
Graphs
CLRS 22.3
11/11 No Class: Veterans Day
11/13 18 A: 12:37
B: 3:45
C: 3:17
A
B
C
Exercises
Problems
Dijkstra’s algorithm Quiz 5 CLRS 24.3
11/16 (8) 19 A: 9:43 A (No Exercises)
Problems
Dijkstra: Proof No Lab: Work on A4
A3 due
A4 out
CLRS 24.4-5
11/18 A: 9:49
B: 7:39
C: 6:38
A
B
C
(No Exercises)
Problems
Game Playing: Minimax
11/20 A: 7:36
B: 9:01
C: 6:29
A
B
C
(No Exercises)
Problems
Planning Quiz 6 CLRS 22.4
11/23 (9) Problems Situated Problems
11/25 No class - Thanksgiving break No Lab: Thanksgiving
11/27 No class - Thanksgiving break
11/30 (10) Dead week - review and special topics Lab: Review
A4 due
12/2 slides, huffman.zip Problems Special topics: Huffman Coding Trees
12/4 No new material; Ask me Anything!
12/8 (Tuesday) Final Exam
open 8am-11:59pm
2 hour limit

Course Policies

Inclusive Classroom Environment

It is expected that everyone will promote a friendly, supportive, and respectful environment in the classroom, labs, and project groups. Everyone’s participation will be equally welcomed and valued.

Attendance

One reason I am keeping lectures synchronous is to help us all maintain a routine, which is extra important when much of the structure in our lives has been upended by circumstances such as a global pandemic. The synchronous lectures will include exercises and group work that will make your learning experience significantly more interactive and, in my experience, more effective.

However, I am aware of the possiblity that you may have extra constraints imposed by family, work, technology access, or any number of other circumstances. For this reason, lecture recordings will be available and attendance will not be tracked. Participating asynchronously puts more responsibility on you as a student to make sure you’re truly absorbing the material, so if you are able to attend the lectures synchronously, I strongly encourage you to do so.

Late Work

You have three “slip days” that you may use at your discretion to submit programming assignments late. Slip days apply only to programming assignments and can not be applied to any other deadline. You may use slip days one at a time or together - for example, you might submit each of three assignments one day late, or submit one assignment three days late. A slip day moves the deadline by exactly 24 hours from the original deadline; if you go beyond this, you will need to use a second slip day, if available.

After your slip days are exhausted, a penalty of 10% * floor(hours_late/24 + 1) - that is, 10% per day late unless you contact me to discuss an additional extension.

How to Submit Late

Submission of assignments is done by (1) pushing your final changes to Github and (2) filling out a Survey quiz on Canvas. To submit late, you don’t need to let me know: simply don’t submit the Canvas survey until you are done. Slip days will be applied automatically based on when you submitted the survey; your grader will note the number of slip days applied in your feedback.

Programming Guidelines

Your programs will be graded on correctness, clarity, and efficiency (in that order).

Correctness:

A correct program is one that always produces the correct output for a given input. Also, a correct program does not produce unintended side-effects. The most effective way to ensure that your program is correct is to test, test, test. Test each component as you introduce it; once you are confident that a component works you can use it in other routines. Try to break your program in testing, and if you succeed, locate the bug and fix it. The better you test your program, the more likely it is to be correct - the more likely it is to be correct, the more likely you’ll earn a good score. Most of your grade will depend on the correctness of your code.

Clarity:

The easier it is to read and maintain your code, the easier it is to locate and remove bugs. Your program should be well organized, appropriately commented, and easy to maintain. To have a well-organized program, design your program thoughtfully and modularly. Think before you code: hacking away blindly leads to ugly, difficult-to-read code. If you do hack away, producing a functional but ugly wall of code, try to clean it up a bit. Make sure that your cleaning does not introduce new bugs.

As for comments, please follow these simple guidelines proposed by Emeritus Professor Osborne:

Efficiency:

Your programs should be asymptotically efficient, e.g. checking graph reflexivity should be O(n), insertion into a balanced tree should be O(log n), etc. Do not optimize your code beyond the asymptotic level, as such tweaks are often at the expense of clarity, correctness, or both.

Academic Honesty

Collaboration Policy - Individual Assignments

Individual programming assignments are to be completed independently. Students are welcome to discuss assignments with each other on a conceptual level, but each student should be writing their code independently and without direct help from fellow students. Sharing your code with others or looking at someone else’s code is an explicit violation of this collaboration policy. To make sure you are collaborating appropriately, follow these two rules:

Automated tools will be used to check your code for plagiarism at the push of a button. They are not fooled by tricks such as changing variable naming and whitespace: in fact, hiding plagiarism is harder than doing the assignment.

University Policies

Please review the University policies outlined at http://syllabi.wwu.edu regarding: