First what algorithm are you going to use?

How about this:

1. From the initial list of length form pairs , and from these pairs form two new list, the small list of the smaller element from each pair and the large list from the larger of each pair. These now each have elements.

2. For the small list of length form pairs and form a new small list from the smaller of each pair giving a new small list of length

3. For the large list of length form pairs and form a new large list from the larger of each pair giving a new large list of length

4. Repeat steps 2. and 3. untill the two lists are both of length 1

Then the largest element in the original list is the element left in the large list and the smallest element in the original list is the element left in the small list.

Now count the comparisons.

.