Module 65 Extra
Dynamic programming
Stop working out the same small question twice, keep each answer, and build bigger answers on top of the ones you kept. Memoization with a dict and functools.cache, bottom-up tables that need no recursion, coin change, paths through a grid, the longest common subsequence and edit distance with the answer read back from the table, and the 0/1 knapsack, with big tests where the plain recursive way takes exponential time.
Steps
- Memoization
- Bottom-up tables
- Coin change
- Paths through a grid
- Longest common subsequence and edit distance
- Challenge: the 0/1 knapsack
After Data structures and algorithms
This is the last module of Data structures and algorithms. Next, you can practice for coding interviews with Interview prep, or try the Pro Track: projects for your own computer with Python and pytest. See the Pro Track