find max in array no increase and then decrease