Algorithms
Sorting, searching, graphs, DP, and shortest paths.
0/17 complete
- SortingHow comparison sorts rearrange data, and why some are O(n log n) and others O(n²).intro
- Linear & Binary SearchThe most basic way to find data — from scanning everything to the efficiency of divide and conquer.easy
- Pathfinding on a GridBFS, Dijkstra, and A* on a grid — how they explore and which find the shortest path.medium
- Two Pointers & Sliding WindowTwo coordinated indices walk an array to solve in one pass what a brute force would solve in two nested loops.easy
- RecursionHow a function that calls itself unfolds into a call tree — and why naive recursion can explode.easy
- Greedy AlgorithmsMake the locally best choice at each step and never look back — fast and simple, but only correct when the problem allows it.medium
- Dynamic ProgrammingSolve overlapping subproblems once and fill a table — turning exponential recursion into polynomial time.hard
- General Graph TraversalBFS and DFS on a general graph — same idea, different frontier (a queue vs a stack).medium
- Bit ManipulationUse bitwise operators to solve problems with extreme efficiency and compact state representation.medium
- BacktrackingExplore every possibility and "prune" the search tree when a path is invalid — from N-Queens to Sudoku.medium
- Topological SortOrder tasks with dependencies so that every task comes before its requirements.medium
- Minimum Spanning TreesConnect all nodes with the minimum total edge weight using Kruskal's or Prim's algorithm.medium
- Shortest PathsDijkstra and Bellman-Ford find the cheapest route in a weighted graph by repeatedly relaxing edges — and only one of them survives negative weights.medium
- String MatchingFind a pattern inside a text in linear time — KMP never rescans a character by precomputing where to jump after a mismatch.medium
- Divide & ConquerSplit a problem into smaller copies of itself, solve those, and combine — the paradigm behind merge sort, fast multiplication, and a clean recurrence for the running time.medium
- Prefix SumsPrecompute running totals once so any range sum becomes a single subtraction — O(1) queries after O(n) setup, plus difference arrays and the 2D version.easy
- Strongly Connected ComponentsGroup the nodes of a directed graph into maximal sets where everyone can reach everyone — Kosaraju finds them with two depth-first passes.medium