Skip to content

CS 141 Winter 2023

Course Information

Welcome to CS 141 Winter 2023 at UC Riverside!

The goal of this course is to learn and explore data structures and basic algorithms design and analysis. It will cover the following topics:

  • Algorithms analysis (asymptotic notation & recurrence relations)
  • Divide-and-conquer algorithms
  • Greedy algorithms
  • Dynamic programming
  • Graph data structures and algorithms
  • Advanced topics in algorithms analysis and design: NP-Completeness

Please provide feedback here


  • Prof. Amr Magdy - 11 AM - 12 PM MWF
  • Prof. Mingxun Wang - 3-4 PM MWF


  • Tuesday - 7 PM
  • Tuesday - 8 AM
  • Friday - 9 AM

Note: Please attend your assigned discussion section as there is limited seating.

Office Hours

  • Prof. Mingxun Wang - Monday 1PM - MRB 4122
  • Prof. Amr Magdy - Monday 12 - 1 PM, Wednesday 2 - 3 PM

Prerequisite(s): CS 014 with a grade of “C-” or better; CS 111; MATH 009C or MATH 09HC; proficiency in C++.


All written homework, homework solutions, and grades will be posted to UCR's Canvas Online System.

Instructional Personel

  • Prof. Amr Magdy -
  • Prof. Mingxun Wang -

Teaching Assistants

  • Yunshu Wang ( -- Office Hours -- 9AM - 10AM Tuesday - MRB 3rd floor balcony
  • Xianghu Wang ( -- Office Hours -- 10AM - 11AM Friday - MRB 3rd floor balcony / Thursday 1PM - 2PM via Zoom link:

Class Communcation

We will use slack as the communication tool for the class. Please accept the invatation in your email.

Reading Materials

Introduction to Algorithms (CLRS).

Third Edition. Cormen, Leiserson, Rivest, and Stein. MIT Press.

Prerequisite knowledge in the book that will not be taught in this course: Please make sure you understand Sections 6, 10-13, and 22.1-22.3 in the book.

Course Schedule

Date Subject Slides
1/9/2023 - Monday Introduction Slides 1-30
1/11/2023 - Wednesday Analysis of Algorithms Slides
1/13/2023 - Friday Analysis of Algorithms Slides
1/16/2023 - Monday MLK Day -
1/18/2023 - Wednesday Analysis of Algorithms Slides
1/20/2023 - Friday Divide and Conquer Slides
1/23/2023 - Monday Divide and Conquer Slides
1/25/2023 - Wednesday Divide and Conquer Slides
1/27/2023 - Friday Dynamic Programming Slides
1/30/2023 - Monday Dynamic Programming -
2/1/2023 - Wednesday Dynamic Programming -
2/3/2023 - Friday Midterm Exam 1 -
2/6/2023 - Monday Dynamic Programming -
2/8/2023 - Wednesday Dynamic Programming -
2/10/2023 - Friday Dynamic Programming -
2/13/2023 - Monday Greedy Algorithms Slides
2/15/2023 - Wednesday Greedy Algorithms -
2/17/2023 - Friday Greedy Algorithms -
2/20/2023 - Monday President's Day -
2/22/2023 - Wednesday Greedy Algorithms -
2/24/2023 - Friday Midterm Exam 2 -
2/27/2023 - Monday Greedy Algorithms / Graphs Slides
3/1/2023 - Wednesday Graphs -
3/3/2023 - Friday Graphs -
3/6/2023 - Monday Graphs -
3/8/2023 - Wednesday NP-Completeness Slides
3/10/2023 - Friday Revisiting Dynamic Programming -
3/13/2023 - Monday Revisiting Divide and Conquer -
3/15/2023 - Wednesday Revisiting Greedy Algorithms -
3/17/2023 - Friday Review Problems -

Student Resources (Slides and other resources)

Section 1:


Homework 1

Homework 2

You must submit your solutions (in pdf format generated by LaTeX) via GradeScope. Canvas will not be accepted.

Course Work/Grade Breakdown

  • Participation Activities (3%)
  • Five homework assignments (40%)
  • Two mid-term exams (32%) - Friday Feb 3rd, Friday Feb 24th.
  • Final inclusive exam (25%)
    • Amr Magdy - Thursday, March 23, 7:00 p.m. - 10:00 p.m.
    • Mingxun Wang - Tuesday, March 21, 7:00 p.m. - 10:00 p.m.

Assignment Policy

  • Unless mentioned otherwise, late submission allowed for 20% penalty for each calendar day.
  • Assignments should be computer-typed and submitted on Canvas
  • If you are using any external source, you must cite it and clarify what exactly got out of it.
  • You are expected to understand any source you use and solve problems in your own.

Academic Integrity

We have the highest standards and expectations for academic integrity. Please refer to the UCR Guidelines.

Any work submitted as a homework assignment or examination must be entirely your own and may not be derived from the work of others, whether a published or unpublished source, the worldwide web, another student, other textbooks, materials from another course (including prior versions of this course), or any other person or program. You may not copy, examine, or alter anyone else’s homework assignment or computer program, or use a computer program to transcribe or otherwise modify or copy anyone else’s files. It is not acceptable to look at exams or homework assignment solutions from prior quarters.

It is not acceptable to share your solutions or codes with your friends, or anyone else (other than the course staffs) without the permission of the instructors. You are not helping your friends by doing so. It is not acceptable to read other students’ solutions or code. You cannot share the course material (e.g., exams, homework assignments and solutions) with anyone else without the permission of instructors after you have completed the course.

Penalties may be assessed after you have completed the course, and some requirements of the collaboration policy (such as restrictions on you sharing your solutions and standard solutions) extend beyond your completion of the course.

The minimum penalty for cheating (including plagiarism from others or using ML tools such as chatGPT) will be a zero grade for the whole assignment; a typical penalty will be at minimum a -100% on the assignment - this will result in worse of a penalty than a 0 on the assigment and take away credit from other assignments. All violations of this collaboration policy will be reported to the university.

Last update: March 3, 2023 21:50:38