table [ i ] will be storing the number of solutions for value i . We need n + 1 rows as the table is constructed in bottom up manner using the base case ( n = 0 ) Initialize all table values as 0
table = [ 0 for k in range ( n + 1 ) ] NEW_LINE