take the integers as the maximum value of integer hoping the integer would not be present in the array
int first = Integer . MIN_VALUE ; ; int second = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) {