Data Structures & Algorithms
39 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Cache Replacement Policieshistorical
LRU, LFU, FIFO, random and modern approximate policies, with workload-dependent hit-rate trade-offs.
- Dynamic Programminghistorical
Solving overlapping subproblems with memoization/tabulation by defining state, transition, initialization, and answer.
- Greedy Algorithmshistorical
Making locally optimal choices only when the problem structure proves they compose into a global optimum.
- Divide and Conquerhistorical
Split a problem into smaller independent subproblems, solve them, then combine their results.
- Recursionhistorical
Recursive problem decomposition, base cases, call-stack cost, tail recursion caveats, and iterative alternatives.
- Backtrackinghistorical
Search a decision tree by choose–recurse–undo, with pruning and state management.
- Depth-First Searchhistorical
Recursive or explicit-stack DFS for graphs/trees, visitation state, cycle handling, and complexity.
- Binary Searchhistorical
Logarithmic search over a monotonic/sorted domain, including boundary variants.