Location and Logistics
CSE 332 Summer 2025 Exam 2: Friday, August 22, 2025
09:40-10:40am (1 hour)
Exam 2 will be held in DEM 102
Makeup Exam
If you are sick the day of the exam do not come to the exam. Send Yafqa an email so we know why you're not there, and we will schedule makeup exams as needed. Similarly in the event of some other emergency (e.g., a car accident on your way to campus), send Yafqa an email and we'll schedule a makeup.
Do note that final course grades are due on Tuesday August 26, four days after
the day of the final. It will be difficult to accomodate makeups. If you are
especially sick or in some other extraordinary circumstance such that you cannot
make proposed makeup dates, you may have to take a final exam in a different quarter, from
a different instructor, or have exam 1 count for 40% of your course grade instead of 20%. Plan accordingly and stay safe!
Exam policies
1. Closed book, closed notes.
2. No calculators, cell phones, or other electronic devices allowed.
3. You will be provided a reference sheet during the exam. We expect it to be this reference sheet, but might add more similar information if needed.
Exam 2 is NON-CUMULATIVE, which means it will only focus on the second half of the
class. This is roughly: Sorting, Graphs, Parallelism, Concurrency. This quarter P/NP is covered on EX12 and thus will NOT be a topic for Exam 2. You should ignore questions on P/NP found on previous exams.
Possible topics Include at least: (NOT NECESSARILY AN EXHAUSTIVE LIST)
- Sorting
- Sorts:
- Simple Sorts: Insertion Sort, Selection Sort
- Heap Sort
- Merge Sort
- Quick Sort
- Bucket Sort
- Radix Sort
- Know run-times and properties (stable, in-place, etc.)
- Know how to carry out the sort
- Lower Bound for Comparison-based Sorting
- Graphs - In general, know how to carry out the operation/algorithm & running time.
- Graph Basics
- Definition; weights; directedness; degree
- Paths; cycles
- Connectedness
- DAGs
- Graph Representations
- Adjacency List
- Adjacency Matrix
- What each is; how to use it; pros and cons of each.
- Graph Traversals
- Breadth-First
- Depth-First
- What data structures are associated with each?
- Dijkstra's Algorithm for Finding Shortest Paths
- Topological Sort
- Prim's Algorithm for Finding Minimum Spanning Trees
- Kruskal's Algorithm for Finding Minimum Spanning Trees
- Use of Disjoint Sets in Kruskal's Algorithm
- Parallelism
- ForkJoin Parallelism, and Associated Terms (Work, Span, etc.)
- ForkJoin Applications, ex: Parallel Summing of an Array
- Reduce: parallel sum, multiply, min, find, etc.
- Map: bit vector, string length, etc.
- Be able to write Java fork join code for simple maps & reductions
- Parallel Prefix Sum Algorithm, Filters, etc.
- Analysis of Parallel Algorithms
- Amdahl's Law
- Given a scenario, use maps, reduces, filters and/or packs to give a high-level algorithm description
- Concurrency
- Race Conditions
- Data Races
- Bad Interleavings
- Synchronizing your code
- Locks, Reentrant locks
- Java's synchronized statement
- Issues of lock scheme granularity: coarse vs fine
- Issues of critical section size
- Deadlock
- Be able to write pseudo-code for Java threads & locks
Topics not tested on
- P/NP
- Parallel sorting algorithms
- IntelliJ
- Generics
- Java syntax
Misc
- Note that you WILL likely be required to write Java code (in
particular Fork-Join code), but we will not be
sticklers for Java syntax. Edge cases and other details of a
correct algorithm - yes, semicolons - no.
Previous exams
We provide some finals from previous quarters of 332 to help with
your studying. These finals were cumulative; exam 2 will be
NON-CUMULATIVE. Be aware that the topics covered may vary from what
will be covered on our exam - refer to the list above if you are
wondering about a particular topic. Our hope is that these exams
will be useful in your studying, but you should NOT take
them as a guarantee of exactly what your exam will be like this
quarter. They are provided only to help you in your
studying. We recommend taking these exams on your own in a timed
environment to get practice both with the material and with
managing your time. Most students find this approach better
preparation than just looking at the solutions.
- CSE 332 25wi Sample Final,
Soln
- CSE 332 23sp Final,
Soln
- CSE 332 23wi Final, (Soln)
- CSE 332 22su Final - Part 1, (Soln)
- CSE 332 22su Final - Part 2, (Soln)
- CSE 332 19au Final, (Soln)
- CSE 332 19wi Final,
(Soln)
- CSE 332 18au Final,
(Soln)
- CSE 332 18wi Final,
(Soln)
- CSE 332 17au Final,
(Soln)
- CSE 332 16au Final,
(Soln)
- CSE 332 15wi Final,
(Soln)
- CSE 332 12sp
final
(Soln)
- CSE 332 12wi
final
(Soln)
- CSE 332 12su
final
(Soln) Note:
this exam was only 90 minutes long.
- CSE 332 10sp
final
(Soln)
- CSE 332 10su
final (no solution available) Note: this exam was only an hour
long.
Good luck with your exam studying!