James Madison University

This is the website for the Fall 2014 offering of CS240 (Data Structures and Algorithms) at James Madison University. Specifically, this is the website for sections 3 and 4 taught by Mike Lam.

The class meets Monday, Wednesday, and Friday, starting August 25 and ending December 5. Section 3 meets at 14:30 (2:30pm) ET on those dates, and section 4 meets at 15:35 (3:35pm) ET. Both classes meet in ISAT 243 or ISAT 250. Please visit the calendar for the week-to-week room schedule.

Office hours (ISAT 227): Tu 12:00-14:00 (noon-2pm) ET
Th 14:00-16:00 (2-4pm) ET

Please use the links above to navigate the website. Important announcements will be posted on this front page. Other course content will appear on the subpages linked above. Please check this website (especially the front page and calendar) regularly for updates.


This semester, we will be using Piazza for class discussions. If you have a question that may be of general interest to your fellow students, please post it on Piazza rather than emailing me directly. This allows others to answer your question or benefit from my answer. I will check the Piazza forum regularly and respond as quickly as I can. To access Piazza, log into Canvas and click the "Piazza" link in the navigation bar on the left. There should be a single, unified Piazza forum for all Fall 2014 sections of CS 240.

Class projects will be submitted via the JMU CS Web-CAT system. Class grades will be accessible via Canvas, and online quizzes will be administered using Canvas as well.


  • 12/15 - Final grades have been submitted. I ended up applying a slight curve to the two midterm exam grades. If you'd like to see your graded final exam please drop by my office during the first two or three weeks of the Spring semester. Have a great holiday break!
  • 12/4 - The scoreboard for the application lab has been finalized. Also, my office hours today will end at 3:30 because of the faculty candidate talk.
  • 12/1 - Solutions for HW5 and PA4 have been posted on Canvas.
  • 11/19 - HW6 (the final HW) has been posted.
  • 11/11 - PA5 (the final PA) has been posted.
  • 11/7 - Final grades for PA3 and Midterm 2 have been posted on Canvas. Also, homework 5 has been posted on the assignments page.
  • 11/5 - Submissions for PA4 have been enabled on Web-CAT.
  • 11/4 - The preliminary Midterm 2 exam grades are posted on Canvas. You have the opportunity to solve Midterm 2 Question 6 as a take-home question for partial credit if you were dissatisfied with your performance on the exam. The details are posted on Piazza. Please bring your completed solution to the lab on 11/5.
  • 10/31 - The readings and general schedule for the next couple of weeks have been updated.
  • 10/28 - PA4 has been posted. In addition, I have posted solutions to HW3, HW4, and PA3 on Canvas under the "Files" section.
  • 10/17 - I hope everyone enjoyed the special combined session with CS 280 today. If you have further questions about the competition or would like to be involved next year, please talk to me or Dr. Mayfield. Also note that I have posted a reading quiz for next Monday, as well as the fourth homework assignment, due 10/27 at 2:30pm.
  • 10/14 - A reading quiz has been posted for 10/15 containing questions from the "Concise Notes" reading as well as Chapter 4 of the textbook. Also, a solution for PA2 has been posted on Canvas. You may use code from that solution in your solution to PA3 as long as you give credit.
  • 10/13 - A copy of the 2013 edition of Fox's "Concise Note" has been posted on Canvas for the 10/15 reading.
  • 10/9 - PA3 (Skip Lists) has been posted on the assignments page.
  • 10/7 - Homework 3 has been posted on the assignments page.
  • 09/30 - The solution key for Midterm 1 has been posted on Canvas. Please do not distribute this file to anyone outside your section! I have also posted the slides for 9/29 and a reading quiz for 10/3.
  • 09/26 - Grades for Midterm 1 have been posted on Canvas. I have also posted a reading quiz for 9/29.
  • 09/25 - Final grades for PA1 have been posted on Canvas. They are a combination of automated grading (80%) and manual inspection (20%). I have also manually adjusted for late penalties because they were not applied correctly by Web-CAT. All fractional grades were rounded up to the nearest integer.
  • 09/24 - A reading quiz has been posted for 9/26. Please note also that I am currently in the process of grading PA1. Disregard any grading emails you receive or temporary scores you may see on Web-CAT. I will announce when final grades are posted on Canvas.
  • 09/23 - The website for PA2 has been updated for clarification on a couple of points. Also, I fixed a minor mistake in t_array.py.
  • 09/22 - The second programming assignment has been posted.
  • 09/17 - A typo in HW02 has been fixed; the second-to-last line in someFunc3 should read "j=j/2" rather than "j=i/2". A reading quiz for 9/19 has also been posted on Canvas, and the slides for 9/17 have been posted on the calendar.
  • 09/14 - Lab 6 (testing) and the 9/17 reading quiz have been posted.
  • 09/12 - I have revised the slide deck for 9/10 to include the full set of analysis introduction slides, and I have posted the in-class exercises that we did on 9/12. I also revised the HW2 files to include the due date as posted in Canvas.
  • 09/11 - Homework 2 is posted. Also, I have posted the Homework 1 solution and a couple of lab solutions to a new "Files" section on Piazza. I may post other solutions as the semester goes on. You may download these solutions for personal use, but DO NOT distribute them to students who are not in your section of CS240! That is a violation of the honor code.
  • 09/10 - The slides for today have been posted. Also, I have added everyone to the class on Web-CAT and published the PA1 assignment. Let me know if you have any difficulties accessing Web-CAT or submitting the PA.
  • 09/09 - A reading quiz has been posted for 9/10.
  • 09/08 - The fifth lab have been posted, as well as announcements about ACM and UUG meetings this week.
  • 09/07 - The PA1 project description has been augmented to clarify efficiency expectations (see the new "Efficiency" section). A reading quiz has also been posted for 9/8.
  • 09/01 - The third lab and the first programming assignment have been posted. Programming assignments can be found on the assignments page. I have also posted a page for useful code snippets.
  • 08/29 - The second lab and the first homework have been posted. Homeworks can be found on the assignments page. There is also a reading quiz on Canvas due on 9/1.
  • 08/28 - A reading quiz has been posted on Canvas; it is due by 14:30 (2:30pm) on 8/29. I also posted a link to a PyDev tutorial on the resources page.
  • 08/27 - I have posted office hours (see above) and the first lab assignment (on the calendar). Future labs will be posted on the calendar in a similar fashion. I have also clarified the syllabus section on excused absences to make it clearer that in-class activities cannot be made up.
  • 08/26 - I have posted the first lecture slides as a link on the calendar; basically, I turned the lecture title into a link to the slides. I will be posting future slides in a similar manner. Note also that there are two quizzes on Canvas that are due tomorrow at 9am.
  • 08/25 - Welcome to CS240! Please take time to thoroughly review the class syllabus and familiarize yourself with the course website. Also, please verify that you can log into Web-CAT, Canvas, and Piazza (through Canvas).