Otherwise remove a character from left end and recur , then remove a character from right end and recur , take the minimum of two is returned
return min ( minRemovals ( arr , l + 1 , h ) , minRemovals ( arr , l , h - 1 ) ) + 1 ; }