After considering once by decreasing sequence , now try for increasing sequence .
else : NEW_LINE INDENT dp [ dec ] [ inc ] [ i ] = min ( countMin ( arr , dp , n , dec , i , i + 1 ) , dp [ dec ] [ inc ] [ i ] ) NEW_LINE DEDENT