minimum is taken of the removal of minimum element or removal of the maximum element
dp [ i ] [ j ] = 1 + min ( countRemovals ( a , i + 1 , j , k ) , countRemovals ( a , i , j - 1 , k ) ) NEW_LINE return dp [ i ] [ j ] NEW_LINE