fill memo array with min counts of elements that will constitute sum upto 100
for i in range ( 1 , 100 ) : NEW_LINE INDENT memo [ i ] = min ( memo [ i - 1 ] + 1 , memo [ i ] ) NEW_LINE DEDENT for i in range ( 10 , 100 ) : NEW_LINE INDENT memo [ i ] = min ( memo [ i - 10 ] + 1 , memo [ i ] ) NEW_LINE DEDENT for i in range ( 25 , 100 ) : NEW_LINE INDENT memo [ i ] = min ( memo [ i - 25 ] + 1 , memo [ i ] ) NEW_LINE DEDENT