ADA100% Active LaboratoryLAB
Longest Common Subsequence (LCS) 2D Grid Lab
Interactive DP grid for DNA/text string alignment. Animates character matching, diagonal increments, and arrow backtracking to recover the LCS.
ADA • SIMULATION0/1 Knapsack Dynamic Programming 2D Table Laboratory
ADA • DYNAMIC PROGRAMMINGOptimal Substructure & Memoization
0/1 Knapsack Dynamic Programming 2D Table Laboratory
Max Capacity: 7 kg|Complexity: O(N × W)
Step:1/ 28
Item 1 excluded. Copied previous optimal subproblem dp[0][1] = 0EXCLUDE
| Item (Weight, Value) | w = 0 | w = 1 | w = 2 | w = 3 | w = 4 | w = 5 | w = 6 | w = 7 |
|---|---|---|---|---|---|---|---|---|
| Base Case (0 items) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Item 1 (w:2, v:3) | 0 | 0 | 3 | 3 | 3 | 3 | 3 | 3 |
| Item 2 (w:3, v:4) | 0 | 0 | 3 | 4 | 4 | 7 | 7 | 7 |
| Item 3 (w:4, v:5) | 0 | 0 | 3 | 4 | 5 | 7 | 8 | 9 |
| Item 4 (w:5, v:8) | 0 | 0 | 3 | 4 | 5 | 8 | 8 | 11 |
Want a step-by-step breakdown from our 4 AI Engineering Agents?
Mastery Standard: Complete all 3 tasks in the Lab Protocol to earn verified mastery credits.
Study Full Unit Notes →