Skip to content

Syllabus

CS 240: Algorithms and Data Structures

Catalog Description

Students learn how to implement stacks, queues, lists, sets and maps using arrays, linked lists, binary trees, heaps, binary search trees, balanced trees and hashing. Students study graph representations and algorithms. Students analyze recursive and non-recursive algorithms, illustrated by various searching and sorting algorithms. Additional topics may be included as time permits. You may only enroll in CS 240 at most twice.

Prerequisites

Fully admitted Computer Science majors or minors only and grades of "C-" or better in CS 159, CS 227 /MATH 227 or MATH 245, and MATH 231 or equivalent.

Class Times

  • Section 3: TTh 9:35 AM - 10:50 AM in King Hall 143
  • Section 4: TTh 11:10 AM - 12:25 PM in King Hall 143

Your Instructor (aka me)

Dr. Isaac Wang

Dr. Isaac Wang (he/him)
Email: wangid@jmu.edu
Office: King Hall 246C
Phone: (540) 568-8177

Office Hours:
  • Monday: 3:30 - 5 PM
  • Tuesday: 3:45 - 5 PM
  • Wednesday: 1 - 2 PM
  • Thursday: 3:45 - 5 PM

(and other times by appointment)

Office hours are times I've set apart for you, no appointment needed — first come, first served! Anytime my door is open, and you have a quick question, feel free to stop by and get help!

For anything else, please contact me primarily via email and include CS240 in the subject1. I will try my best to respond within a day or two. If you don't hear back from me within that time frame, please send me a reminder email.

Note

I typically do not answer email on the weekends or in the evenings, so please be sure to contact me early. Don't forget to also rely on your fellow classmates!


About the Course

Textbook

We will be using a free eTextbook by OpenDSA. Assigned readings will be provided on Canvas.

Please make sure you access these through Canvas in order to receive credit for the readings!

Goals and Objectives

My goal is that you leave this course with a solid understanding of the fundamental data structures and algorithms in computer science. My emphasis is for you to know these structures inside and out, and be able to implement them in code, as well as solve problems using them.

The focus is on your learning and understanding, not just getting the right answer. So don't be afraid to ask questions, make mistakes, and learn from them! Over-relying on AI and others may get you the right answer, but it won't help you learn. I encourage you to really engage with the material to get the most out of this course.

At the end of this course, you should be able to:

  • Describe, explain, and use abstract data types including stacks, queues, lists, sets, maps and graphs.
  • Implement those data types using both contiguous and linked structures.
  • Implement a variety of algorithms for searching and sorting, including linear search, binary search, insertion sort, selection sort, merge sort, quicksort, and heap sort.
  • Read and write recursive algorithms. Understand when recursion is, and is not, appropriate.
  • Characterize the performance of recursive algorithms.
  • Analyze the time and space efficiency of data structures and algorithms and apply this analysis to select the best tools for solving particular problems.

Class Recordings

I will be recording most lectures to improve accessibility and inclusion. This is not a pass to skip class; we will still have required in-class activities and participation. However, the videos should help with your understanding, serve as helpful review material, and allow you to catch up if something does arise.

What will be recorded?

I will be video/audio recording me, the slides, and work done on the whiteboard. I will stop to pause recordings during questions and other student participation.

How can I see the recordings? Who will see the recordings?

Recordings will be available only through Canvas. Any recordings will be available only to the instructor(s) and students enrolled in the class during that particular class term.

What if I don't want to be recorded?

Your privacy matters to me. You will typically not be audio or video recorded. The only possibility is if you ask a question out loud while recording is ongoing. To avoid this, please wait until after I pause the recording before asking a question, or submit your questions anonymously using PollEverywhere.

Concerns? If you have concerns about being recorded, please contact me privately and prior to the first recorded session to share those concerns.

Can students make recordings?

Only instructors may record class sessions. Students are prohibited from unauthorized recording, and are prohibited from downloading recordings. Students requesting the use of assistive technology, including recording, as a reasonable accommodation should direct their request to the Office of Disability Services. See Academic Affairs Policy #15: "Class Session Recordings and Distribution for further information."


Course Format

This course will be a combination of lectures, in-class activities, and lab sessions. You will get out of these what they put in -- so take them seriously and actually think through the problems!

Assignments

Type Weight
Online Quizzes and Readings 10%
Labs and In-class Activities 15%
Programming Assignments 15%
Midterm 1 15%
Midterm 2 20%
Final Exam 25%

Grading Scale

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 (such as "+" and "-" grades) after considering the overall performance of the class and actual distribution of numeric scores. I do not assign WP or WF grades except in extreme circumstances.

In-class Activities / Attendance Policy

You are expected to show up for every class session. I give credit for in-class activities, so you must be present and participate in order to receive credit!

If you will be absent for any class period for a legitimate reason, please email me before class begins and I can make sure you get the material we will cover and make arrangements as needed. You are still responsible for making up activities and labs outside of class. However, I will automatically excuse up to two activities to make up for missed class days.

Take Care of Yourself

If you are feeling unwell, please stay home and take care of yourself. I will work with you to make sure you don't fall behind. However, it is your responsibility to communicate with me about your absence and make up any missed work!

Weekly Readings

There will be assigned reading each week, posted on Canvas. Readings are designed to complement the material covered in class, meaning you need to both attend class and complete the readings to fully understand the concepts.

Most readings will include interactive exercises that you must complete to receive credit on the reading.

Readings will typically be due on Mondays at 11:59 PM, unless otherwise specified on the assignment.

Late Policy

All reading deadlines are considered a "soft" deadline. This means that you can get credit for readings up until the end of the semester. However, you need to know the material before taking the quizzes, so still strive to complete them on time!

Online Quizzes

Quizzes will be assigned with the reading assignments. They will be a mix of multiple choice, short answer, coding questions, etc. Quizzes will be open-note/open-book (not open-internet) and timed, but you must complete them on your own (no AI, no collaboration).

Quizzes will typically be due on Wednesdays at 11:59 PM, so you have some time after finishing the reading to think about it and ask questions.

Late Policy

No late work will be accepted for quizzes. If you may miss the deadline due to an extraneous reason, please contact me early to discuss a possible extension.

Labs

We will have in-class labs where you practice implementing concepts and solving problems. Labs are designed to be completed during class time, but submissions will usually be open until the night before the next class period. You will submit your code to Gradescope.

Collaboration Policy

You are encouraged to work with your classmates during labs, and are allowed to look at each others' code, but you must submit your own work. If do you work with someone else, please include their name in a comment at the top of your code.

Programming Assignments

One of the goals of this course is to get you ready to build larger projects with complex specifications. We will have 4 programming assignments over the course of the semester. Programming assignments are to be completed individually. Due dates will be posted along each assignment in Canvas.

Programs will be graded on correctness, efficiency, documentation, and overall code quality. All submissions must conform to the CS240 Style Guide.

Late Policy

You may submit HW assignments up to 48 hours late. Late submissions will be capped at 80% of the total points. For example, if you submit late and receive a grade of 96/100, your final grade for that assignment will be 80/100.

Collaboration Policy

You may not freely collaborate on programming assignments. The goal of these assignments is not to get the right answer, but to learn how to solve problems on your own. You may discuss the assignment with others in the class, but you must write your own code.

Allowed:

  • discussing the assignment, general strategies, test cases, or code that is not part of the assignment
  • drawing diagrams on a whiteboard
  • searching online or using AI for general information and error messages
  • reviewing class concepts together

Not Allowed:

  • sharing, copying, or looking at someone else's code or psuedocode (even to help them debug)
  • helping or guiding other students step-by-step
  • using code from the internet, a previous semester, or from AI
  • having someone else write your code for you

When in doubt, ask me!


Academic Honesty

Students who violate the Honor Code (http://www.jmu.edu/honorcode/code.shtml) will receive a reduced or failing grade in the course. Other penalties may be imposed, and all violations will be reported to the Honor Council. Automated tools may be used on any assignment, at any time, to detect inappropriate collaboration and to determine the originality of submissions.

Warning

You may not submit code written by other people as your own. If you use references or sources outside of what is provided in class, you must include a link to the resource and a description of what you learned/applied from it. This does not give you a pass to freely copy and paste code found on the internet.

Representing someone else's work as your own, in any form, constitutes an honor code violation. Directly copying or using the same code is an honor code violation. It is also a violation of the honor code to “render unauthorized assistance to another student by knowingly permitting them to copy all or a portion of an examination or any work to be submitted for academic credit.” That means that you can be written up for an Honor code violation if you share your code with someone else, even if you wrote it completely on your own.

AI/ChatGPT Policy

Simply put, you may not use AI or other generative tools to cheat. Using AI to generate solutions, hints, or otherwise do your work for you is explicitly forbidden.

You may use AI to help you understand concepts and as a general learning resource, but I would much rather you ask me for help if you're stuck. I've got the human touch™️!

Any work submitted must still be your own – this is a learning environment, and relying heavily on AI may do more harm than good. If you have questions about this policy, or what constitutes appropriate usage of AI tools, please ask!


University Requirements

Adding/Dropping Courses

Students are responsible for adding and dropping courses. Please consult the appropriate academic calendar for the exact withdrawal deadlines. I will not give "WP" or "WF" grades to students requesting a drop after the deadline except in extraordinary circumstances.

Disability Accomodations

If you have a documented disability and need accommodations in this course, please register with the Office of Disability Services (http://www.jmu.edu/ods, Student Success Center, Room 1202, 540-568-6705). They will provide you with an Access Plan Letter to verify your need for services and make recommendations for the course. I will be happy to discuss your access plan with you.

Excused Absences

Students who are unable to attend class due to JMU sponsored activities (such as sports, band, academic competition, field trips, etc.) or personal religious observances may request reasonable accommodations. Please notify me during the first week of class or as soon as possible regarding potential absences so that we can determine alternative methods for you to complete the required work.

Disruptive Behavior

Disruptive conduct disrupts the process of teaching and learning, and such behavior will not be tolerated in the classroom, lab, online discussion or other place of student learning. Failure to live up to these responsibilities carries with it the possibility of sanctions, up to and including removal from a class, removal from a program and/or removal from the university. The full policy regarding class disruptions is available from the Academic Affairs website.

Inclement Weather

For severe weather and other unexpected circumstances, watch for announcements relating to make-up dates. See http://www.jmu.edu/JMUpolicy/1309.shtml for JMU’s cancellation policy. Although the schedule may adapt to canceled classes, assignment deadlines generally do not change.

Your Wellbeing

Last but not least, as a university student, there may be times when personal stressors interfere with your academic performance and/or negatively impact your daily life. If you or someone you know is experiencing mental health challenges at James Madison University, please connect with the Counseling Center located within the Student Success Center on the 3rd floor. You can learn more about available services by visiting https://www.jmu.edu/counselingctr or calling 540-568-6552. Their services are free and confidential. Other available support resources to consider include, but are not limited to, the Office of the Dean of Students, the Health Center, and Learning Strategies Instruction.


  1. If you include CS240, I notice and reply to it sooner 😉