After considering element as part of increasing and decreasing sequence trying as not part of any of the sequence .
else dp [ dec , inc , i ] = Math . Min ( 1 + countMin ( arr , dp , n , dec , inc , i + 1 ) , dp [ dec , inc , i ] ) ; return dp [ dec , inc , i ] ; }