The algorithm works as:
A[n] // Given an array of size n
Max = Min = A[0]
for i=2 to n
if A[i]>Max Max=A[i]
else if A[i]<=Min Min=A[i]
Best Case : If elements are sorted in increasing order n-1 comparisons
Worst Case : If elements are sorted in decreasing order 2(n-1) comparisons
Average Case : if half of array contains elements greater than max 1.5n-2 comparisons