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