Is it possible to find the second maximum number from an array of integers by traversing the array only once?
As an example, I have a array of five integers from whi
int max,secondMax; max=secondMax=array[0]; for(int i=0;imax) { max=array[i]; } if(array[i]>secondMax && array[i]