CS 240: Algorithms and Data Structures
James Madison University, Spring 2024

Course Information

Location: Classroom: King 143
Lab: King 248
Meeting Time: Section 3, MWF 1:50-2:40PM
Section 4, MWF 3:00-3:50PM
Prerequisites: Grades of "C-" or better in CS 227/MATH 227 or MATH 245, MATH 231 or equivalent, and CS 159.
Required Textbook: We will be using an interactive electronic textbook developed by the OpenDSA project. The book will be made available through Canvas.

Instructor Information

Name: Dr. Nathan Sprague
Office: King 226
Office Phone: 568-3312
Email: spragunr@jmu.edu
Office Hours: http://w3.cs.jmu.edu/spragunr/schedule.html

Questions related to course content should be asked through Piazza. The advantage of Piazza is that I can address common questions in one location, rather than answering the same question multiple times via email. I also encourage you to respond to each others' questions on Piazza; this provides everyone with more timely responses and crafting an answer can help you to understand the material better. You may use email if you need to contact me directly.

You are welcome to call or stop by my office any time, with the understanding that I may or may not be available outside of my posted office hours. If you need to meet with me outside of my posted hours, email me to make an appointment.

Note that I typically do not respond to email or Piazza posts in the evenings or on the weekends.

If you contact me and don't hear back within a day or two, don't give up! I try to respond to email in a timely manner, but sometimes one falls through the cracks. I won't be offended if you send a follow up message.

My office hours this semester will use a hybrid online/in-person format. You are free to attend in-person or online via Zoom. The Zoom link will be made available on the course Canvas page.

Course Content and Goals

The focus of this course is on solving computational problems that involve collections of data. We will study a core set of data abstractions, data structures, and algorithms that provide a foundation for writing efficient programs.

At the conclusion of this course students will be able to:

Course Schedule

A detailed schedule including readings and other assignments will be made available on the course web page. Posted readings should be completed before the start of class. The schedule will be updated throughout the semester and should be checked regularly.

Course Structure and Grading

Readings and OpenDSA Exercises

Most assigned readings will include embedded exercises. These will usually allow as many attempts as necessary for you to complete all questions correctly. These exercises should be completed before the start of class. If you are stuck on an exercise, you are free to postpone completing it until you have had a chance to ask questions in class. Exercises will have a final cutoff date approximately 24 hours after the original deadline. No submissions will be accepted after that cutoff date.

It is important that you keep up with the readings in this course. You should not expect that every important point from the reading will be discussed in class.

Weekly Quizzes

Peer Instruction and In-Class Activities

Peer Instruction combines short lectures with multiple-choice questions that target common misconceptions. You will use a clicker-like app called Socrative to respond to each question twice. The first response is ungraded, and will be followed by a short discussion with your peers. You will then respond again individually for a grade (3 points just for answering, 4 points if your answer is correct) and we will discuss the results.

Other in-class activities will involve breaking up into small groups to answer questions or to work on programming exercises.

Lab Activities

Most weeks will include an in-class lab activity. Friday coding labs will be due by Tuesday night of the following week. Late lab submissions will not be accepted. Labs are intended to facilitate in-class discussion of concepts and coding strategies. Therefore, attendance is required in order to receive credit. Some non-coding activities will be graded entirely on the basis of attendance. You are encouraged to read the lab descriptions before class on Friday, but you should not complete the labs in advance.

Muddiest Points

Each Wednesday I will ask you to submit a "muddiest point" reflection highlighting concepts that were unclear from the reading or lecture.

Programming Assignments

There will be approximately four programming assignments over the course of the semester. Programming assignments in this course will be implemented in Java. Programs will be graded on correctness, efficiency, documentation, and overall code quality. All submissions must conform to the CS240 Style Guide.

Grade Calculation

The final course grade will be calculated according to the following distribution:

Online Quizzes, Muddiest Points, OpenDSA Readings 10%
Labs and In-Class Activities 15%
Programming Assignments 20%
Two Midterm Exams 30%
Final Exam 25%

Letter grades will be assigned on the scale A=90-100, B=80-89, C=70-79, D=60-69, F=0-59, with potential minor adjustments after considering the overall performance of the class and actual distribution of numeric scores. I will use "+" and "-" grades at my discretion. I do not assign WP or WF grades except under extraordinary circumstances.

Course Policies

Attendance and Participation

Regular attendance and fully engaged participation is expected. Your grade will be partially based on in-class assignments, so attendance will affect your grade. If possible, please bring a laptop for in-class coding exercises. You should also bring scratch paper and a writing utensil.

Academic Integrity

Your work in this course must comply with the provisions of the JMU honor code: http://www.jmu.edu/honor/code.shtml. It is not a violation of the honor code to discuss assignments and solutions with other students at a conceptual level. However, all of the work that you submit must be written by you, based on your own understanding of the material. Representing someone else's work as your own, in any form, constitutes an honor code violation. It is also a violation of the honor code to "render unauthorized assistance to another student by knowingly permitting him or her to see or copy all or a portion of an examination or any work to be submitted for academic credit." In the context of this course, this portion of the Honor Code means:

A key component of academic integrity is giving credit where credit is due. If you receive assistance, either from another student or from some other source, you must acknowledge that fact. To that end, all assignments submitted for this course must include a statement that acknowledges any assistance you received and must contain the statement: "This work complies with the JMU Honor Code."

For example, if I were submitting this syllabus for credit, I would include the following statement:

This work complies with the JMU Honor Code. I would like to acknowledge the assistance of Chris Fox and Michael Kirkpatrick. Portions of this document were copied directly from their syllabi.
-Nathan Sprague

I will prosecute honor code violations if they come to my attention. If in doubt about what is allowed, ask me.

Missed and Late Assignment Policy

In general, attendance will be required in order to receive credit for in-class work, including labs. In the case of an unavoidable absence, send me an email in advance with a brief explanation of why you can't attend. I may not respond immediately, but your email will provide a record of the circumstances. You will not receive credit for in-class work if no prior notice is provided. I will do my best to accommodate occasional absences, but I reserve the right to withhold credit in the case of chronic absences.

Programming assignments will be due at 11:00PM on the posted due-date. Assignments submitted after the deadline will be subject to a 25% penalty for the first day. The penalty will increase to 50% after 24 hours. No assignments will be accepted more than 48 hours after the deadline.

Except under extraordinary circumstances, I will not provide extensions for illnesses, extracurricular obligations, etc. Instead, you will have three "late days" which may be applied to any programming assignment (with possible exceptions for assignments due at the end of the semester). The use of a late day allows you to extend the deadline for an assignment by 24 hours. You may apply at most two late days to a single assignment.

Classroom Behavior

The ACM (https://www.acm.org) is the main professional organization for computer scientists. It is expected that your work in this course will conform to the the ACM Code of Ethics (https://www.acm.org/code-of-ethics), which forbids discrimination and harassment of all types. If you believe someone is violating these principles (e.g., by making inappropriate or demeaning remarks), it is your responsibility to take action by informing me or, if you feel comfortable doing so, addressing the individual directly. I will do my best to preserve your confidentiality when addressing the issue.

Phones should be silenced and put away during class unless they are being used for a course-related activity. If you violate this policy, I reserve the right to give you a long pointless lecture about the failings of your generation and the probable downfall of civilization. This will be embarrassing for both of us.

Fifty minutes is a short period of time. Please be ready to begin work at the scheduled start of class and refrain from packing up to leave until the class period is over. In exchange, I will commit to ending class promptly at the scheduled time.

Adding/Dropping

Students are responsible for adding and dropping courses via MyMadison. Please consult the registrar's page of dates and deadlines for exact deadlines.

Disability Accommodations

If you need an accommodation based on the impact of a disability, you should contact the Office of Disability Services (Student Success Center, Room 1202, www.jmu.edu/ods, 540-568-6705) if you have not previously done so. Disability Services will provide you with an Access Plan Letter that will verify your need for services and make recommendations for accommodations to be used in the classroom. You are encouraged to with me to review the course requirements and your requested accommodations to develop an individualized plan appropriate for this course.

Inclement Weather Policy

This class will operate in accord with JMU's inclement weather policy available at http://www.jmu.edu/JMUpolicy/1309.shtml

Religious Observation Accommodations

I will give reasonable and appropriate accommodations to students requesting them on grounds of religious observation. If you require such accommodations you must notify me at least two weeks in advance.

Catalog Description

Students learn to implement and analyze elementary data structures and the basic complexity classes of algorithms that use strategies such as greedy algorithms, divide-and-conquer algorithms, and backtracking algorithms. This analysis is especially applied to problems in searching, sorting, and parsing.