← Courses
CS 310 · 4 credits
Course Outline
Algorithms
The LeetCode-readiness course. You finished Data Structures, and now you learn the algorithms and patterns interviews actually test: analysis in practice, binary search, sorting, two pointers, sliding window, prefix sums, recursion, backtracking, BFS and DFS, greedy, and dynamic programming. Every concept comes with runnable Python you execute and modify, and the course ends with a pattern-recognition checklist and a practice plan for the DSA platform.
What you will learn
- ✓Compare two solutions by counting steps and reasoning about best case, worst case, and memory
- ✓Write binary search correctly, use bisect, and apply the binary-search-on-the-answer pattern
- ✓Explain how bubble sort, merge sort, and quicksort work, and use sorting as a setup step for harder problems
- ✓Solve array and string problems with two pointers and sliding windows
- ✓Use prefix sums, custom sort keys, and adjacency-list building as everyday setup moves
- ✓Write recursive functions with confidence, draw recursion trees, and speed them up with memoization
- ✓Generate subsets and permutations with backtracking
- ✓Traverse graphs and grids with BFS and DFS, and know when each one wins
- ✓Recognize greedy problems and avoid the classic greedy traps
- ✓Build 1-D and 2-D dynamic programming solutions, plus Dijkstra and topological sort
- ✓Walk into an interview with a pattern-recognition checklist and a practice plan
Course outline
Unit 1Analysis in practice
- 1-1Two solutions, one problem4 checks · 10 min
- 1-2Best case, worst case, and space5 checks · 10 min
Unit 2Searching
- 2-1Linear search, the honest baseline4 checks · 7 min
- 2-2Binary search, deeply4 checks · 14 min
- 2-3bisect and binary-search-on-the-answer5 checks · 13 min
Unit 3Sorting
- 3-1How sorting works: bubble and selection5 checks · 12 min
- 3-2Merge sort: divide and conquer4 checks · 13 min
- 3-3Quicksort intuition and sort-then-solve4 checks · 12 min
- 3-4Sorting by key: how engineers actually sort4 checks · 10 min
Unit 4Two pointers and sliding window
- 4-1Two pointers5 checks · 13 min
- 4-2Sliding window5 checks · 13 min
- 4-3Prefix sums4 checks · 11 min
Unit 5Recursion from zero
- 5-1Recursion and the call stack4 checks · 12 min
- 5-2Recursion trees3 checks · 11 min
- 5-3Memoization: remember what you solved5 checks · 13 min
Unit 6Backtracking
- 6-1Explore, then undo: subsets5 checks · 12 min
- 6-2Permutations and pruning5 checks · 13 min
Unit 7BFS and DFS
- 7-1Graphs and depth-first search4 checks · 13 min
- 7-2BFS on grids, and when each wins4 checks · 13 min
- 7-3Building the graph, and DFS without recursion4 checks · 11 min
Unit 8Greedy algorithms
- 8-1The greedy leap4 checks · 11 min
- 8-2Greedy wins and traps5 checks · 12 min
Unit 9Dynamic programming I
- 9-1From memo to table: climbing stairs5 checks · 14 min
- 9-2House robber: choose or skip4 checks · 11 min
- 9-3Coin change, done right5 checks · 13 min
Unit 10Dynamic programming II and graph algorithms
- 10-12-D DP: grid paths4 checks · 12 min
- 10-2Dijkstra's mental model4 checks · 12 min
- 10-3Topological sort4 checks · 12 min
Unit 11Interview strategy capstone
- 11-1The pattern-recognition checklist4 checks · 12 min
- 11-2Practice like it is the job3 checks · 10 min
Practice while you learn
Use Hack University's public online code editor when you want to run code online before committing to the full curriculum. The browser compilers are free for quick syntax checks, exercises, and interview practice in an isolated sandbox environment.