Data Structures and Algorithms

University of Washington, Summer 2024

Anna Batra

she/her

batraa@uw.edu

Office Hours

Mondays 2:20–4:20 PM

Hi, I’m Anna (IPA: [ɑnə]), your instructor! I just graduated with a MS in Computational Linguistics (NLP) this June. I also graduated with a BA Linguistics (UW), though my interest is now in CS Education. I’ve also been a TA for the Allen School for 3 years and will be going on to be a part-time lecturer at Cascadia College in the fall! I love to binge Asian dramas & listen to K-pop! Please reach out if you’d like to chat! If you’ve got ideas for continuous course improvement, let me know as well! :)

Favorite summertime drink: Iced Green Tea Latte

Husky Maps is a web app for mapping the world, searching for places, and navigating around Seattle. All these features are powered by data structures and algorithms, programming abstractions designed to represent data and automate processes. In your prior programming experience, you learned how to implement specifications by writing Java programs that used data structures to solve problems. In this course, you’ll learn how to answer the why question: Why did we write the specification that way in the first place?

There are many decisions to make when designing a software system, and many of these decisions have significant consequences on qualities of a system. In this course, we’ll focus on learning data structures as implementations of abstract data types. An abstract data type describes what you can do with a data type, but not how the data type is implemented; a data structure provides both a description of functionality and a specific implementation of functionality. Rather than think of problems as requiring custom algorithms that we invent from scratch each time, abstract data types help us think of problems as variations that can be addressed by adapting more general algorithm ideas.

Data Structures and Algorithms presents a selection of these ideas in a way intended to help you design, analyze, and evaluate software systems. Learning these ideas can enable fuller participation in the community of computing professionals. This 9-week course is organized around four 2-week case study projects and two Design Exams. By the end of the course, you’ll have retraced the history of invention for 4 abstract data types, 12 implementations of them, and 7 real-world problems that they address:

  1. Deque data structures for browsing history.
  2. Autocomplete data structures and algorithms for search suggestions and DNA indexing.
  3. Priority queue data structures for content moderation and shortest paths.
  4. Shortest paths and graph data structures for seam carving and navigation directions.
  5. Design Exams to apply your creativity to design and implement software.

What will you learn?

Deques

Arrays and Nodes

6/17
Arrays and Nodes
Slides · Worksheet · Marked
PrjProject Setup by 6/18
PrjDeques by 6/28
6/19
Holiday (Juneteenth)
6/20
Sec Reference Semantics
Slides · Worksheet
6/21
Deques
Slides · Worksheet · Marked

WksArrays and Nodes by 6/23

Runtime and Sorting

6/24
Asymptotic Analysis
Slides · Worksheet · Marked
ExcExercise 1 by 7/1, peer review by 7/5
6/26
Iterative Sorts
Slides · Worksheet · Marked
6/27
SecAsymptotic Analysis
Slides · Worksheet
6/28
Merge Sort
Slides · Worksheet · Marked
PrjAutocomplete by 7/12
WksRuntime and Sorting by 6/30

Autocomplete

Search Trees

7/1
Binary Search Trees
Slides · Worksheet · Marked
ExcExercise 2 by 7/8, peer review by 7/12
7/3
TSTs & Tries
Slides · Worksheet · Marked
7/4
Sec Holiday (Independence Day)
7/5
More Recurrences
Slides · Worksheet · Marked
WksSearch Trees by 7/7

Isomorphism and Heaps

7/8
2-3 Trees
Slides · Worksheet · Marked
ExcExercise 3 by 7/15, peer review by 7/19
7/10
Left-Leaning Red-Black Trees
Slides · Worksheet · Marked
7/11
Sec Isomorphism
Slides · Worksheet
7/12
Binary Heaps
Slides · Worksheet · Marked
PrjPriority Queues by 7/26
WksIsomorphism and Heaps by 7/14

Priority Queues

Hashing and Graphs

7/15
Hash Tables
Slides · Worksheet · Marked
ExcExercise 4 by 7/22, peer review by 7/26
7/17
Affordance Analysis
Slides · Worksheet · Marked
7/18
Sec Heaps and Hashing
Slides · Worksheet
7/19
Graph Data Type
Slides · Worksheet · Marked
WksHashing and Graphs by 7/21

Graph Algorithms

7/22
Graph Traversals
Slides · Worksheet · Marked
7/24
Shortest Paths Trees
Slides · Worksheet · Marked
DesMidterm Interview by 7/30
7/25
Sec Graphs
Slides · Worksheet
7/26
Dynamic Programming
Slides · Worksheet · Marked
PrjShortest Paths by 8/9
WksGraph Algorithms by 7/28

Shortest Paths

Minimum Spanning Trees

7/29
Minimum Spanning Trees
Slides · Worksheet · Marked
ExcExercise 5 by 8/5
7/31
Live Midterm Interviews
8/1
Sec Graph Algorithms
Slides · Worksheet
8/2
Code Strategies I
WksMinimum Spanning Trees by 8/4

Iterative Design

8/5
Code Strategies II
8/7
Iterative Design
Slides · Worksheet · Marked
8/8
Sec Accessibility Graphs
Slides · Worksheet
8/9
More Minimum Spanning Trees
Slides · Worksheet · Marked
DesGraph Algorithm Design Final by 8/15
DesIterative Design Final by 8/16
WksIterative Design by 8/11

Design Final

Design Final

8/12
More Dynamic Programming + Sorts
Slides · Worksheet · Marked
8/14
Office Hours
8/15
Sec Office Hours
8/16
Live Final Interviews

Why should we learn?

The education you receive in this course can help prepare you for programming jobs, but this isn’t the only purpose for computing education.1 Education is not only about yourself and your personal gain, but also about all of us and our capacity to live together as a community.

The University of Washington acknowledges the Coast Salish peoples of this land, the land which touches the shared waters of all tribes and bands within the Duwamish, Puyallup, Suquamish, Tulalip and Muckleshoot nations. Among the traditions of the Coast Salish peoples is a value for the connectedness between all living things and a recognition of the unique ways that each of us comes to know something.2

Modern education has the idea that we all need to know the same thing. At the end of the lesson, everyone will know the same thing. That’s why we have tests, that’s why we have quizzes, that’s why we have homework: to ensure we all know the same thing. And that’s powerful—that’s important—within a certain context.

But for native culture, the idea that each listener divines or finds their own answer, their own meaning, their own teaching from the story is equally powerful—that each person needs to be able to look at the world and define it for themselves within their culture and then also find a way to live in that world according to the teachings of their people in their culture.

Our course emphasizes the following values and policies.

We are responsible for each others’ success
Everyone has a right to feel like they belong in this course. We’ll need to act with compassion and caring to collaborate with each other. Although we will need more than just unexamined commitments to collaboration, listening, empathy, mindfulness, and caring,3 the following guidelines offer a starting point for ensuring compassion toward each other.4
  • Listen with intention to understand first and form an opinion only after you fully understand.
  • Take responsibility for the intended and unintended effects of your words and actions on others.
  • Mindfully respond to others’ ideas by acknowledging the unique value of each contribution.

You should expect and demand to be treated by your classmates and teachers with respect. If any incident occurs that challenges this commitment to a supportive, diverse, inclusive, and equitable environment, please let the instructor know so the issue can be addressed. Should you feel uncomfortable bringing up an issue with the instructor directly, meet our advisors during quick questions or contact the College of Engineering.

We recognize everyone has unique circumstances
Do not hesitate to contact the instructor by private discussion post or email. The sooner we are made aware of your circumstances, the more we can help. Extenuating circumstances include work-school balance, familial responsibilities, religious observations, military duties, unexpected travel, or anything else beyond your control that may negatively impact your performance in the class.
It is the policy and practice of the University of Washington to create inclusive and accessible learning environments consistent with federal and state law. If you have already established accommodations with Disability Resources for Students (DRS), activate your accommodations via myDRS so we can discuss how they will be implemented in this course. If you have a temporary health condition or permanent disability that requires accommodations, contact DRS directly to set up an Access Plan.
Washington state law requires that UW develop a policy for accommodation of student absences or significant hardship due to reasons of faith or conscience, or for organized religious activities. The UW’s policy, including more information about how to request an accommodation, is available at Religious Accommodations Policy. Accommodations must be requested within the first two weeks of this course using the Religious Accommodations Request form.
We believe everyone wants to learn
Education is about shaping your identity as much as it is about learning things. In school, the consequences of making mistakes are relatively small. But the habits you form now—repeated over days, weeks, months, or years—determine who you will be in the future. Now is the best time to practice honest habits.
We ask that you do not claim to be responsible for work that is not yours. When you receive substantial help from someone else, include a citation. Don’t post your solutions publicly. Most importantly, don’t deprive yourself or others of the learning opportunities that we’ve created in this course.
Academic honesty reflects the trust (or the lack thereof) between students and teachers. We do our best to design the course in ways that ensure trust, but we know our systems are not perfect. If you submit work in violation of these policies but bring it to the attention of the instructor within 72 hours, you may resubmit your own work without further consequence. Rather than blame students, we want to fix or replace broken systems that compel students to lose trust.

Students are expected to follow Washington state law on the Student Conduct Code for the University of Washington. In this course, students must:

  • Indicate on assignment submissions any assistance received, including materials distributed in this course.
  • Not receive, generate, or otherwise acquire any substantial portion or walkthrough for an assignment.
  • Not aid, assist, attempt, or tolerate prohibited academic conduct in others.

For all assignments, you must cite any sources you used, including lecture materials, section materials, and collaboration with peers. If you used any kind of computer technology to help prepare your project deliverable, include the queries and/or prompts.

Submitted work that is not consistent with sources may be subject to the student conduct process.

How will you learn?

In a traditional classroom, you attend class while a teacher lectures until time is up. Then, you go home and do the important work of applying concepts toward practice problems or assignments on your own. Finally, you take an exam to show what you know.

Today, we know that there are more effective ways to learn science, engineering, and mathematics.5 Learning skills like software engineering and algorithm analysis requires deliberate practice: a learning cycle that starts with sustained motivation, then presents tasks that build on prior knowledge, and concludes with immediate, personalized feedback. Each module in the course will involve several different activities that are designed so that we can make the most of our class time together.

On your own before class, prepare for learning by completing the pre-class preparation.
In Canvas, read the weekly Lessons and complete the Pre-Class Quiz
Lessons are designed to introduce all the concepts for the entire week’s classes.
In your team during class and quiz section, collaborate on the in-class guided practice.
In Canvas at the end of the week, turn in your completed Worksheets
Class meetings are designed to deepen, complicate, and connect ideas across the course.
On your own after class, complete take-home assessments to show what you learned.
In Canvas, demonstrate your learning by explaining your work for each Exercise
Your videos emphasize not only problem solving skills, but also communication skills.
In Canvas, demonstrate your learning by assembling a Project
Projects are designed to integrate and situate what you learned in real-world problems.
For the midterm and final, apply your creativity to Design and implement software.
In the midterm, complete TA-led interviews on efficient implementations for software.
In the final, draw on your data structures and algorithms expertise to redesign software.

Communicating your ideas and explaining your problem solving process is important in this course. We ask students to record their own screenshared and voiced videos because they provide rich information about your solution process and authenticate your assessment. But we know that visual or voiceover presentations are not accessible or equitable for everyone. If for any reason a voiceover presentation won’t work for you, we would be happy to work with you to find a better way to communicate your ideas and explain your problem solving process. You do not need to disclose why you feel uncomfortable, but we were thinking about people with vision impairment, gender and voice dysphoria, limited access to resources, or complicated living situations when designing this policy.

Expect to spend 4 hours in class and 8 hours outside of class working on this course. Some weeks may require more or less time than other weeks. If you find the workload is significantly exceeding this expectation, talk to your TA.

  • 8:30 AM
  • 9:00 AM
  • 9:30 AM
  • 10:00 AM
  • 10:30 AM
  • 11:00 AM
  • 11:30 AM
  • 12:00 PM
  • 12:30 PM
  • 1:00 PM
  • 1:30 PM
  • 2:00 PM
  • 2:30 PM
  • 3:00 PM
  • 3:30 PM
  • 4:00 PM
  • 4:30 PM
  • 5:00 PM
  • 5:30 PM
  • 6:00 PM
  • 6:30 PM
  • 7:00 PM
  • 7:30 PM
  • 8:00 PM
  • Sunday

    • Office Hours
      9:00 AM–11:00 AM
      Zoom
  • Monday

    • Lecture
      1:10 PM–2:10 PM
      PCAR 290
    • Office Hours
      2:20 PM–4:20 PM
      DEN 113 & Zoom
  • Wednesday

    • Lecture
      1:10 PM–2:10 PM
      PCAR 290
    • Office Hours
      2:20 PM–4:20 PM
      BAG 108 & Zoom
  • Thursday

    • Section AA
      12:00 PM–1:00 PM
      BAG 331 A
    • Section AC
      1:10 PM–2:10 PM
      BAG 331 A
    • Section AD
      2:20 PM–3:20 PM
      ECE 037
    • Office Hours
      6:00 PM–8:00 PM
      Zoom
  • Friday

    • Lecture
      1:10 PM–2:10 PM
      PCAR 290
    • Office Hours
      2:20 PM–4:20 PM
      BAG 108 & Zoom

How is this course graded?

Grading in this course encourages learning through deliberate practice by emphasizing revision and resubmission of work. Most of the coursework is designed around feedback loops where you try something, get feedback, then try again. Grades are based on what you eventually learn through this process.

We will have these minimum guarantees when we convert from course submissions to final grades. That is, if you meet the conditions in the table, your final grade can be no lower than the grade shown in that row.

GradeExamsExercise ProblemsProjectsCoding StrategiesIn-Class Work
4.0Full points across the Midterm + Final11S4S4S1.0 of all canvas quizzes + worksheets
3.5Full points across the Midterm + 0.5 points across the Final11S4S4S1.0 of all canvas quizzes + worksheets
3.00.5 points across the Midterm11S4S4S1.0 of all canvas quizzes + worksheets
2.5None9S4S4S1.0 of all canvas quizzes + worksheets
2.0None7S3S3S0.75 of all canvas quizzes + worksheets
1.0None4S, with at least one on four different Exercises2S2S0.5 of all canvas quizzes + worksheets

To be guaranteed a particular minimum grade, all requirements for that grade must be met. Failing to meet any of the requirements for a particular minimum grade does not preclude the possibility of receiving that grade (as the steps described above indicate), but we do not provide any estimates or guarantees beyond those listed here. For example, it’s possible to still earn a 3.0 or above even if you miss one of the requirements since every piece of work done above the required minimum can go to increasing your course grade; it’s just not guaranteed you will get a 3.0 or above if you don’t make all requirements (but even if something is not guaranteed, it can still happen).

We will use the full 4.0 grade scale (it is possible to get a 3.7 or 3.3, for example, even though those rows aren’t in the table). At the end of the quarter, we will develop formulas to interpolate between grade breaks. We will not release these formulas at the end of the quarter, nor will we debate whether another formula might have made for different results.

Exact final grades, including all grades not listed above, will be determined at the end of the quarter by the course staff based on each student’s overall body of work. Estimates of students’ final grades beyond the requirements listed above will not be provided.

Resubmission Policies

There are no penalties for resubmissions or late work turned in using a resubmission. You can use a resubmission as your first submission, without penalty, if you wish. Though we recommend turning in what you have at the time to get feedback from a TA for improvement!

As a result of the resubmission process, we don’t offer extensions for late work because you can resubmit instead. Design Exams are not eligible for resubmissions.

Projects & Exercise Problems

Resubmissions are due on Friday nights at 11:59pm. You may resubmit them under the Canvas module titled Resubmissions.

Here is the schedule for Resubmissions. It is subject to change based on the staff’s capacity.

Weeks 3-8 each respectively, you may resubmit:
One project
Two exercise problems
Week 9, you may resubmit:
One project
Three exercise problems

Code Strategies & In-Class Work

Worksheets, pre-class quizzes, and Code Strategies assignments can be submitted at any point throughout the quarter, by Friday 8/16 11:59PM. Here are the policies for each assignment:

  • Worksheets: If you receive an N or U on any component of the worksheet, just create a new submission with the required components. We will grade your resubmission in our own time.
  • Pre-class quizzes can be submitted at any time!
  • Code Strategies assignments can be submitted at any time, though your grades will not sync between FeedbackFruits and Canvas immediately. We will periodically sync grades manually.
  1. Mark Guzdial. 2021. Computer science was always supposed to be taught to everyone, and it wasn’t about getting a job

  2. Roger Fernandes. 2012. Roger Fernandes: Artist/Storyteller/Educator

  3. Brian Arao and Kristi Clemens. 2013. “From Safe Spaces to Brave Spaces: A New Way to Frame Dialogue Around Diversity and Social Justice” in The Art of Effective Facilitation

  4. Asao B. Inoue. 2019. “Sample Charter for Compassion” in Labor-Based Grading Contracts: Building Equity and Inclusion in the Compassionate Writing Classroom

  5. Scott Freeman, Sarah L. Eddy, Miles McDonough, Michelle K. Smith, Nnadozie Okoroafor, Hannah Jordt, and Mary Pat Wenderoth. 2014. Active learning increases student performance in science, engineering, and mathematics


Explore CSE 373

  • Lessons - Learning materials and resources.
  • Projects - Project instructions and specifications.
  • Staff - All the teaching and learning assistants.