CSUMB, CS Online
CST 370 — Design and Analysis of Algorithms
completed Fall 2026, Term A
- units
- 4
- typically offered
- Fall, Spring
- prerequisites
- CST 238 and MATH 170 with a C- or better
Course description
Students learn important data structures in computer science and acquire fundamental algorithm design techniques to get the efficient solutions to several computing problems from various disciplines. Topics include the analysis of algorithm efficiency, hash, heap, graph, tree, sorting and searching, brute force, divide-and-conquer, decrease-and-conquer, transform-and-conquer, dynamic programming, and greedy programming.
Source: CSUMB Catalog 2025–2026.
Completed Fall 2026, Term A.
Every week was a Java program graded against hidden test cases, so the output had to match exactly and the edge cases had to hold up. The work started with basics like min, max, and median, then moved into the real material:
- Brute force: closest pair of numbers, intersecting a set of ranges, and generating every subset of a set using binary counting
- Graphs: storing a weighted graph as an adjacency list, using DFS to find disconnected pieces of a graph and the edges needed to join them, topological sort with Kahn’s algorithm, and a BFS that finds everyone exactly N degrees away from a person in a social network
- Heaps and hashing: checking and building a max heap, plus a hash table with linear probing that rehashes when it fills up
- Dynamic programming: the robot coin collection problem and Floyd’s algorithm for all pairs shortest paths
The biggest change for me was thinking about efficiency before writing any code instead of after.