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,10 @@
|
||||
Unique Paths on a 3 x 7 grid (right and down only)
|
||||
==================================================
|
||||
|
||||
0 1 2 3 4 5 6
|
||||
row 0 1 1 1 1 1 1 1
|
||||
row 1 1 2 3 4 5 6 7
|
||||
row 2 1 3 6 10 15 21 28
|
||||
|
||||
answer = bottom-right cell = 28
|
||||
10 x 10 grid: table = 48620, one row = 48620, binomial C(18,9) = 48620
|
||||
Reference in New Issue
Block a user