Add dynamic-programming module: ten classic DP problems, memoization vs tabulation vs space-optimised, call-count and pitfall transcripts (11 tests)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
Cross-check: 300 random inputs per problem, every variant must agree (seed 2026)
|
||||
================================================================================
|
||||
|
||||
problem cases variants compared
|
||||
Climbing Stairs 300 memo = table = two variables (n up to 39)
|
||||
House Robber 300 memo = table = two variables
|
||||
Coin Change (fewest) 300 naive = memo = table (amount up to 29)
|
||||
Longest Increasing Subseq. 300 memo = O(n^2) table = O(n log n) patience
|
||||
0/1 Knapsack 300 naive = memo = 2-D table = one row (backward)
|
||||
Longest Common Subsequence 300 naive = memo = full table = two rows
|
||||
Edit Distance 300 memo = full table = two rows
|
||||
Unique Paths 300 memo = table = one row = binomial formula
|
||||
Partition Equal Subset Sum 300 memo = 2-D table = one row (backward)
|
||||
|
||||
Fibonacci is cross-checked in 01-fibonacci-call-counts.txt (naive = memo = table = two variables).
|
||||
Reference in New Issue
Block a user