then find the minimum and maximum number out of first n-1 numbers (n-1 is even), then compare the last number with the maximum number if it is larger than maximum then the total comparisons are (3n/2)-2+1=(3n/2)-1 otherswise have to compare with minimum(to find whether the last element is minimum or not) then total comparisons are (3n/2)-2+2 = 3n/2.