CS 240Data Structures and Data Management
- Units
- 0.50
- Faculty
- Mathematics
- Subject
- Computer Science
When it runs
- F24
- W25
- S25
- F25
- W26
- S26
- F26
- W27
- S27
Ran in 7 of the last 7 terms. Winter 2027: scheduled, 3 lecture sections. Spring 2027: schedule not out yet.
Introduction to widely used and effective methods of data organization, focusing on data structures, their algorithms, and the performance of these algorithms. Specific topics include priority queues, sorting, dictionaries, data structures for text processing.
Prerequisites
- Complete all of the following
- Must have completed at least 1 of the following:
- Must have completed at least 1 of the following:
- Must have completed at least 1 of the following:
- Enrolled in H-BBA & BCS Double Degree, H-Computer Science (BCS), H-Computer Science (BMath), JH-Computer Science (BCS), JH-Computer Science (BMath), H-Computing & Financial Management, H-Data Science (BCS), H-Data Science (BMath), or H-Software Engineering
Antirequisites
- Not completed nor concurrently enrolled in any of the following:
Leads to
Fall 2026 sections
| Section | Class | Enrolled | Meets |
|---|---|---|---|
| LEC 001 | 5997 | 67 / 90 | TTh 10:00–11:20 |
| LEC 002 | 6226 | 84 / 90 | TTh 14:30–15:50 |
| TUT 101 | 5936 | 33 / 60 | F 08:30–09:20 |
| TUT 102 | 6524 | 59 / 60 | F 09:30–10:20 |
| TUT 103 | 6525 | 59 / 60 | F 12:30–13:20 |
| TST 201 | 6526 | 151 / 180 | Oct 22 16:30–18:20 |
Winter 2027 sections
| Section | Class | Enrolled | Meets |
|---|---|---|---|
| LEC 001 | 5599 | 0 / 90 | TTh 11:30–12:50 |
| LEC 002 | 5770 | 0 / 90 | TTh 14:30–15:50 |
| LEC 701 | 2178 | 127 / 9999 | Online or by arrangement |
| TUT 101 | 5836 | 0 / 60 | F 12:30–13:20 |
| TUT 102 | 5837 | 0 / 60 | F 13:30–14:20 |
| TUT 103 | 5838 | 0 / 60 | F 14:30–15:20 |
| TST 201 | 5679 | 0 / 180 | Mar 4 16:30–18:20 |
Resources
Around the web
Found by uwloo’s link finder, which checks that each page names CS 240.
- CS240, Fall 2026: Home/Tools directory Course website · Fall 2026 · student.cs.uwaterloo.ca Remove
- CS240 Course Notes Course notes · jaidenratti.com · from Jaiden Ratti’s site, CS webring Remove
- Data Structures and Data Management Data Structures Course notes · plett.dev · from Josiah Plett’s site, CS webring Remove
- cs240 Course notes · cdn.shopify.com · posted on r/uwaterloo Oct 2014 Remove
- Remove
Course notes, 6 pages david-duan.me · posted on r/uwaterloo Mar 2022
- CS240 | Anthony Zhang Course notes · anthony-zhang.me · posted on r/uwaterloo Jul 2020 Remove
- CS 240 (Data Structures and Data Management) Other · cs.uwaterloo.ca · from Armin Jamshidpey’s site · gone now; archived copy from May 2010 Remove
- Cuckoo Hashing Visualization :: Laszlo Kozma Other · lkozma.net · from UWaterloo Links (SE) Remove
5 more links
- Data Structures & Algorithms I Used Working at Tech Companies - The Pragmatic Engineer Other · blog.pragmaticengineer.com · from UWaterloo Links (SE) Remove
- Free Modulo Calculator - a mod b Remainder, Step by Step Other · miniwebtool.com · from UWaterloo Links (SE) Remove
- Remove
Other, 2 pages visualgo.net · from UWaterloo Links (SE)
- Remove
Other, 4 pages dcode.fr · from UWaterloo Links (SE)
- bzip2-hough: My implementation of the BZip2 algorithm in C++ with a linearithmic time Burrows-Wheeler… Other · github.com · by mjhough on GitHub Remove
Reviewed on UW Flow
59% liked it56% easy63% useful
From 848 ratings and 138 comments on UW Flow. The most helpful comments, quoted as written, without names. Read them all on UW Flow.
Meow
Aug 2024 · liked it · 7 found this helpfulOn UW FlowRemove this
2nd most useful course I've taken so far at UW, behind CS246. The quality and quantity of things learned in this course is astounding, and it has already benefitted me with interviews. Had a dev interview a week after we learned AVL trees, boom, question on AVL trees.
Jul 2016 · liked it · 3 found this helpfulOn UW FlowRemove this
i wish it either chose to be theory heavy or application heavy. trying to get some of each isn't working very well for the course (no details). the assignments are enjoyable and extend lecture content well. the exams are fine.
Aug 2024 · liked it · 2 found this helpfulOn UW FlowRemove this
It is math-heavy throughout, more so before the midterm, which needs to be done well for CS 341 I feel. There are many algorithms and their implementation & analysis throughout, study them regularly and they should be fine. Assignments can be long and sometimes challenging, the midterm was tough but the straightforward final made up for it.
Aug 2024 · liked it · 1 found this helpfulOn UW FlowRemove this
Useful but not hard. Very poor organization, assignment gradings are arbitrary, TAs are your enemies
Apr 2024 · didn’t like it · 1 found this helpfulOn UW FlowRemove this
Discussed on r/uwaterloo
1,558 posts and comments in 1,044 threads mention CS 240, December 2011 to December 2024. Quoted word for word, newest first; each reply sits under the post and the comment that started its branch. Search r/uwaterloo for newer posts.
Fall 2024
Alternatives to CS240 and CS341 open to Honours Math? 12 points, 15 comments
u/Original-Jackfruit12: “2nd year in computational mathematics, really wanna take both these but can’t, are there similar alternatives I can take?”
u/Super_Lettuce6166: “Cs234 is an alternative for cs240 I guess”
2B CS Course Selection 1 point, 1 comment
u/Scapedd: “… path to go for, mainly looking to maintain a decent GPA, but ideally also want to get to CS 240 (for interviews) and CS 350 as soon as possible. …”
u/amsyed10385: “… If you took CS240 during workterm instead of 241 maybe you can fit CS 341 into 3A. CS 348 isn’t really a good course, would prioritize 341/350 over 348. …”
2B CS course selection 2 points, 3 comments
u/Standard-Lecture-950: “… Option 1: CS 246, 245, 251, math 239 in 2B and then CS 240, 241, Stat 231, CS 3xx in 3A 2. …”
u/iamanaybaid555: “Your best combination would be: • CS 246 (pre-requisite for CS 241 and CS 240) • CS 251 (pre-requisite for CS 350) • MATH 239 (pre-requisite for CS 341) • CS 245 (pre-requisite for CS 240) • One elective Two reasons for not taking 231 with this would be a heavier workload and no …”
any 2nd year cs courses that you can take with cs 116? 5 points, 6 comments
“Is there any 200 CS courses that are direct successors of 116? or do I need to take 136 no matter what?”
u/Efodoge: “… I don’t know what CS240 is like obviously but I would like to think CS234 is a solid alternative for us math students.”
CS135 Withdrawing 4 points, 5 comments
“I barely passed the CS135 midterm and I need a 50% in the final exam to pass the course. Is it doable to get a 50% in the final or should I consider withdrawing?”
u/iamanaybaid555: “… If this ever happens to you again while you're doing CS 136, 246, 240, 341; you'll face it with some experience rather than going in blind. …”
Most academically difficult term so far? 25 points, 39 comments
“Wondering which year/term was the most challenging for you? Preferably students in engineering or more specifically mech eng.”
u/InDiAn_hs: “2B CS (MATH 239, CS 240, CS 241, STAT231, SCI 238)”
Most interesting upper-year CS classes 13 points, 8 comments
“Rising 4B CS here. Currently on my schedule I have 488 (Graphics) since I’ve been meaning to take that since like 2nd year and CS 492 since I feel like it’d be fun to talk about the social …”
u/Impossible_Ebb2433: “If you enjoy CS341 and CS240 style stuff, take CS466.”
CS 240 Fall 2022 5 points, 1 comment
2B CS course suggestion 1 point, 4 comments
“i'll be heading into 2B in Winter 2025 (sequence 4) and will also be searching for 2nd co-op in Spring 2025. …”
u/wer2slay: “CS246 is probably one of the most useful courses I've taken at waterloo. Highly recommend you spend around 15-20 hours a week on that alone. …”
u/Standard-Lecture-950: “… I think ill do stat 231 cuz doing 239 will make no difference cuz ill have to get done with cs 240, cs 241 to take cs 341 and cs 350 so ill do them in 3A”
HLTH/KIN 217 and HLTH 204 Midt-erterm and final test on the same days 1 point, 3 comments
“As said in the title, both the mid-terms and the final term tests are on the same day (since they both decided to cut a final exam for the courses). …”
u/abwehr2038: “bro you shoulda see last term when they put math239 and cs240 on the same day.”
What is the hardest term of your program and what is your program? 2 points, 3 comments
“Also why is it that so (harder courses or underprepared due to prereqs)?”
u/InDiAn_hs: “It is definitely 2B for CS lol - I found CS246,245,251 from 2A way easier than CS241 and CS240 in 2B. Not to mention MATH239 is a nightmare and I also took STAT231 which was ok”
Anyone in cs240/241 looking for study partners 3 points, 1 comment
u/Consistent_Sleep_117: “240 is confusing ;((((((”
Check it elsewhere for Fall 2026
- Undergraduate Calendar, 2026–27The official entry
- Requirements for Fall 2026Waterloo’s requisite checker
- Schedule of Classes, Fall 2026Instructors, rooms, live seats
- Quest Class SearchWhere you enrol
- Course outlinesSyllabi from past terms (UW login)
- UW FlowStudent ratings and reviews
- WClassesPast sections back to 2004, and who taught them