Place the current digit such that it is less than the previous digit
if ( sign == 1 ) : NEW_LINE INDENT for digit in range ( prev - 1 , - 1 , - 1 ) : NEW_LINE INDENT val += solve ( i + 1 , n , digit , 0 ) NEW_LINE DEDENT DEDENT