data structures & algorithms (patterns)
the structures that run production and the patterns that close interviews. balanced trees, b-trees, graphs, and dynamic programming. part 2 of 3.
19 lessons|5 modules|~4 hours
what you’ll learn
- understand the balanced trees, b-trees, and skip lists behind databases and redis
- compose structures into the lru and lfu caches real systems run on
- solve graph problems with topological sort, dijkstra, and minimum spanning trees
- recognise and apply backtracking and dynamic programming patterns on sight
- close the gap with intervals, bit tricks, and a repeatable way to attack any problem
curriculum
planning sketchthis is a rough curriculum we’re still planning. modules and lessons are likely to shift before any lesson is recorded. want to shape it? mail@karnstack.com.
01
module one
balanced and specialized trees
48 min4 lessons01balanced trees: avl, red-black, and why your map uses onecoming soon14m
02tries: prefix trees and where autocomplete comes fromcoming soon9m
03b-trees and b+ trees: how every database index workscoming soon14m
04skip lists: how redis sorted sets workcoming soon11m
checkpoint
module quiz · balanced and specialized trees
5 questions · ~5m · test your recall before moving on
02
module two
structures that run production
31 min3 lessons05union-find: disjoint sets and path compressioncoming soon10m
06lru and lfu caches: composing structurescoming soon11m
07bloom filters and probabilistic structurescoming soon10m
checkpoint
module quiz · structures that run production
5 questions · ~5m · test your recall before moving on
03
module three
graph algorithms
33 min3 lessons08topological sort: ordering under dependenciescoming soon9m
09shortest paths: dijkstra and bellman-fordcoming soon14m
10minimum spanning trees: kruskal and primcoming soon10m
checkpoint
module quiz · graph algorithms
5 questions · ~5m · test your recall before moving on
04
module four
backtracking and dynamic programming
74 min6 lessons11backtracking: subsets, permutations, combinations, one templatecoming soon13m
12what dp actually is: memoization becomes tabulationcoming soon14m
131d dp patterns: kadane, house robber, climbing stairscoming soon11m
142d dp patterns: grids, knapsack, edit distancecoming soon14m
15sequence dp: lcs and liscoming soon10m
16greedy vs dp: when greedy is provably correctcoming soon12m
checkpoint
module quiz · backtracking and dynamic programming
5 questions · ~5m · test your recall before moving on
05
module five
the patterns that close the gap
37 min4 lessons17intervals: merge, insert, and the sweep linecoming soon10m
18bit manipulation and the math you actually needcoming soon11m
19non-comparison sorts: counting, radix, bucketcoming soon9m
--how to approach any problem + what to learn nextcoming soon7m
checkpoint
module quiz · the patterns that close the gap
5 questions · ~5m · test your recall before moving on
frequently asked
- when does this launch?
- in planning, sequenced after foundations. the curriculum on this page is a sketch. modules and lessons are likely to shift before any lesson is recorded.
- do i need part 1 first?
- ideally yes. this part assumes you're fluent with arrays, hashing, trees, heaps, and basic graph traversal. equivalent experience works just as well.