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
The easiest solution would be to use std::nth_element.