NOTE
3.2 Dynamic Programming
Dynamic programming can be derived from recursion and memoization. These notes use path-counting examples to explain states, transitions, and optimal substructure.
This is a historical learning note and may contain outdated or incomplete understanding.
1. Dynamic Programming Steps
- Recursion + memoization -> recurrence
- State definition:
opt[n],dp[n],fib[n] - State transition equation:
opt[n]=best_of(opt[n-1], opt[n-2], ...) - Optimal substructure
2. Example
2.1. Path Count Calculation
- Recursion
- Recurrence
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.



Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub