Describe an algorithm for finding both the largest and the smallest integers in a
finite sequence of integers in an array and count them how many comparison
operation are involved.

Answer :

Keep two variables, max and min and assign each of them as the first element of the array.
Traverse through the array and compare each element with max and min and update max and min accordingly: 
if(A[i] >max) max = A[i]
if(A[i] < min) min = A[i], where A is the array and i as an index.
This procedure would require 2 * n comparisions, where n is the length of the array.