Greedy Algorithms: Making Locally Optimal Choices
Learn when greedy algorithms work, how to prove correctness using exchange arguments, and common greedy patterns.
Learn when greedy algorithms work, how to prove correctness using exchange arguments, and common greedy patterns.
Deep dive into each major sorting algorithm with implementations, complexity analysis, and when to use each.
Master the 0/1, unbounded, and fractional knapsack variants with DP solutions and optimization techniques for resource allocation problems.
Learn Kruskal's algorithm for finding minimum spanning trees in weighted graphs using union-find data structures.
Compare linear and binary search algorithms, understand when to use each variant, and master binary search for production systems.
Find the longest strictly increasing subsequence in O(n log n) time using patience sorting and binary search techniques.
Understand the two fundamental DP approaches—top-down with memoization and bottom-up with tabulation—plus hybrid techniques like the/m on the fly.
Learn Prim's algorithm for finding minimum spanning trees starting from a vertex, using a greedy approach with priority queues.
Master recursive thinking, base cases, call stack management, and backtracking algorithms for generating permutations and combinations.
Master red-black tree properties, insertion fixup cases, and color flip mechanics. Learn when RB trees outperform AVL and when they don't.