CS 146 (Sections 4, 5): Data Structures and Algorithms, Spring 2024

David Scot Taylor
Associate Professor
Dept. of Computer Science
San Jose State University
212 MacQuarrie Hall
Phone: (408) 924-5124 (email works better)
Email: david.taylor "at" sjsu.edu

Spring 2024 office hours:

  • Monday, noon-1 (in person).
  • Tuesday, 10:30-11:30 (in person).
  • Other times available, especially on Tuesdays. Set up an appointment by email.

Office hours will generally be in-person. When they are virtual, use this zoom link for zoom office hours, and you will enter the waiting room (I will see one at a time in the order you enter, occasionally updating the waiting room through chat about the size of the queue.)

Class Meetings:

Course Website

The main course website will be on SJSU's Canvas website.

Students Trying to Add

Students trying to add the class by addcode this semester (for any section of CS146, regardless of instructor) should fill out this form. Note, most sections of the class are already full, but usually a few students do drop out of sections in the first weeks, especially when prerequisites are checked.

For my sections, you should also attend one of my sections the first day of classes. I will take attendence of those trying to add. You only need to go to one of my sections, but if you are also interested in sections by the other professors, you should also attend one of their sections.

If you attend my first day of class, and the email address on your request to add is recognized by SJSU, I will temporarily add you to the course. If not, you can't see the homework, so I will post the first assignment below, to let you know what tasks to do, and in what order. If you have access to a SJSU One account, I can give you temporary access to Canvas with your student ID number.

Students Without an SJSU ID (or that contact me during the strike)

If you have an ID number, I can use it to give you temporary access to the canvas page. Without an ID, I can set it up so that you (and the rest of the world) can see the canvas page, but you won't be able to submit anything. For the first homework, I will post something here so that you can see most of the assignment, but don't worry about submitting anything for now. (The Canvas page is not published yet.)

  1. We will use this discord server for class discussions. After joining the server, email me to get access to actually read the channels, though there won't be much to read there when it is first set up. Include CS146Spring24 in your subject.
  2. Watch the Links, Stacks, and Queues Playlist. This should approximately be review, except the 4th video, which you can skip if you want. Generally, don't try to get ahead of the class for videos, I think they will be most effective if watched when assigned. The whole playlist is 40-50 minutes (depending on if you watch the 4th video), and because it is review, it should be fairly easy to follow.
  3. Take the quiz in canvas after watching the videos. (Sorry, I don't have any easy way to make Canvas quizzes available to you. If you do add the class later, early quizzes will be available for a couple of weeks if you want to take them then.)
  4. Skim: Appendix A.1, especially equations A.1, A.2, A.5, A.6, and A.7.
  5. Read/Skim (somewhere in between?): Appendix A.2.
  6. You should always have a computer, ready to run Java, during class.
  7. You should submit prerequisites to Canvas when you get access.
  8. Do the following written homework. (This is the part of the assignment that should be turned in on the "due date" of this assignment, which is in class Monday for this one.):
    1. Assume that a program runs in f(n)=lg n microseconds. How large an input n can be while still finishing the run in 1 second? 1 minute? 1 hour? 1 day? 1 month? 1 year?

      What if f(n) = sqrt(n)? n? n lg n? n2? 2n?

      For reference, in 1 second, sqrt(n) can allow nup to 1012, and n2 allows n up to 1000.

    2. Find a simple formula for \sum_{k=1}^n (2k-1) ∑ k = 1 n ( 2 k − 1 ) . Prove your answer.
    3. Find a formula for the product: \prod_{k=1}^n{4^k/2} ∏ k = 1 n 4 k / 2 . Prove your answer.
    4. Give an asymptotically tight bound for: \sum_{k=1}^n{k^r} ∑ k = 1 n k r where: r ≥ 0 is constant.