let n=6
and say array as 7,8,6,4,1,3
divided into two parts (7,8,6) and ( 4,1,3)
further divided into (7,8) (6) and (4,1) (3)
step 1: compare 7 and 8. here min=7 and max=8. (1 comparison)
step 2: compare 6 with min and max values (2 comparisons)
again compare (4,1) and min=1 and max=4( 1 comparison)
compare those with max and min values respectively (2 comparisons) .
lastly, compare final min and max values with 3 (2 comparisons)
total will be 1+2+1+2+2=8 comparisons