Fill the subsett table in bottom up manner
for i in range ( n + 1 ) : NEW_LINE INDENT for j in range ( summ + 1 ) : NEW_LINE INDENT if ( j < sett [ i - 1 ] ) : NEW_LINE INDENT subsett [ i ] [ j ] = subsett [ i - 1 ] [ j ] NEW_LINE DEDENT if ( j >= sett [ i - 1 ] ) : NEW_LINE INDENT subsett [ i ] [ j ] = ( subsett [ i - 1 ] [ j ] or subsett [ i - 1 ] [ j - sett [ i - 1 ] ] ) NEW_LINE DEDENT DEDENT DEDENT