Update the value of dp [ i ] [ j ]
if ( i > 0 ) : NEW_LINE INDENT dp [ i ] [ j ] += dp [ i - 1 ] [ j ] NEW_LINE DEDENT if ( j > 0 ) : NEW_LINE INDENT dp [ i ] [ j ] += dp [ i ] [ j - 1 ] NEW_LINE DEDENT