DP Table Filling Process

i = 0
i = 1
i = 2
i = 3
i = 4
i = 5
i = 6
i = 7
0
-∞
-∞
-∞
-∞
-∞
-∞
-∞
Step 0 of 21

We are solving a problem with: n=7, a=2, b=3, c=5

Initial state: Only dp[0] = 0, all other values are -∞ (negative infinity).

We will fill the dp table step by step where dp[i] represents the maximum number of cuts possible for a rod of length i.