Introduction to Algorithms and Complexity

Lecture, four hours; discussion, two hours; outside study, six hours. Enforced requisites: course 32, Mathematics 61. Designed for junior/senior Computer Science majors. Introduction to design and analysis of algorithms. Design techniques: divide-and-conquer, greedy method, dynamic programming; selection of prototypical algorithms; choice of data structures and representations; complexity measures: time, space, upper, lower bounds, asymptotic complexity; NP-completeness. Letter grading.

Review Summary

Clarity
5.0 / 10
Organization
5.0 / 10
Time
0-5 hrs/week
Overall
6.7 / 10

Reviews

    Quarter Taken: Fall 2022 In-Person
    Grade: A

    Majid, in general, is a decent lecturer. He is relatively engaging, and I walked away from class most days with a good idea of the algorithm he talked about. However, there was more than one occasion where I had no idea what he was talking about, as someone would ask a question, and he would back on what he said, and outright contradicting himself without even realizing.

    The midterm was rough, but if you follow his advice (be able to write out every algorithm from lecture without looking at your notes or textbook, and prove its correctness/time complexity), then you should be in a decent spot. Also learning the sliding-window algorithm (which he doesn't explicitly cover) is a good idea.

    Leetcode is your best friend.

    Quarter Taken: Fall 2022 In-Person
    Grade: B

    The professor didn't use slides and just "talked it through" the concepts. I didn't like this, though some of my friends liked his structure that went on tangents based on the questions he received.

    Quarter Taken: Fall 2022 In-Person
    Grade: A

    The lectures were dynamic and thought-provoking, presented by an instructor who demonstrated a profound understanding of the subject matter. The use of real-world examples and visualizations effectively conveyed complex algorithmic concepts. The instructor's enthusiasm for the material was infectious, making the class engaging and fostering a curiosity to explore algorithmic challenges further.

    The tests were a fair reflection of the challenging nature of the course material. The integration of theoretical knowledge with practical problem-solving skills was evident in the exam format. Regular assignments and coding exercises adequately prepared me for the assessments, although a more detailed review session before exams could have reinforced key concepts and strategies.

    Quarter Taken: Fall 2022 In-Person
    Grade: B+

    Majid doesn't have slides or uploads any recordings, which was kinda lame but the book was definitely helpful to read whenever his lectures didn't make any sense. Highly recommend going to lecture when you can, as he usually says which problems he's going to put on the exams. Do the homework and go to lecture and the exams should be pretty straightforward.

    Quarter Taken: Spring 2024 Online
    Grade: A

    This class was completely online, so it was very easy to get distracted and completely lose track of what was happening in class. That said, the professor takes time to answer all questions and tries his best to make sure that everyone in the class is following what's going on. Classes are also recorded and posted to BruinLearn, though he takes down the recordings after a few days. Methodologies are taught by example problems, and you have to be able to compare example problems to find the commonalities between the examples, so that you can apply the methodology to a new problem that you're given on an exam or homework. I think that the grading is fair, especially because an 85% and above is an A. The exams could be tricky, and to prepare for them, it's best to just do many practice problems for each topic/methodology.

    Quarter Taken: Spring 2024 Online
    Grade: A

    I felt the class was pretty fair. The lectures were dry but adequate. Expect to spend a lot of time on the homeworks. They were quite challenging.
    The attendance policy was annoying. You had to attend every Zoom lecture and he would cold call people to make sure you were paying attention. This was annoying because it meant you couldn’t watch lectures with friends and it made it harder to attend lectures in a library.

    Quarter Taken: Fall 2023 In-Person
    Grade: C

    Nothing is recorded, attendance is mandatory but exams are fair although homework and exam content is a lot more challenging than lecture content.

    Quarter Taken: Fall 2023 In-Person
    Grade: A

    Lectures are clear and I found them to be generally enjoyable. Professor likes to slip in the occasional joke while explaining stuff.

    Roughly each week we were assigned six problems for homework. The majority are regarding concepts learned from the corresponding week of lectures, and some others are more tech interview style problems. The homework probably takes on average at least an hour per problem if you're really trying to make sure you understand the concepts. The professor recommends to think over problems over multiple days, and I agree.

    Exams made up 80% of the grade, 35% midterm, 45% final. The problems that show up on the exams are actually relatively easy compared to the homework, but it is a bit of a struggle to come up with good thorough solutions under the time constraints. Some problems you will have never seen before and it kinda be like a coin flip as to whether you'll realize a solution or not. Generous partial credit is given if your answer is anywhere close to the intended solution. Final grades are also hella curved. Regarding the midterm, the professor said the average was about a 70% and that based solely on the midterm scores, about a 78% would be an A in the class. My overall score for the class prior to curving was a B, and it got raised to an A.

    I found the class to actually be quite enjoyable and interesting after ignoring the looming sense of dread that comes with the exams.

Course

Instructor
Majid Sarrafzadeh
Previously taught
25W 24S 24W 23F 22F 22S 20F 19F 18F 17F 16F 16W 14F 13F 12F 11F 10F 08F 07F 06F 05F 04F 03F 02F 01F

Grading Information

  • No group projects

  • Attendance required

  • 1 midterm

  • Finals week final

  • 78% recommend the textbook