In this exercise, you must compute the second maximal value contained in an array, i.e. the value that becomes the maximum if you remove every instance of the current maximum from the array.
As usual, you should gather the information in only one traversal of the array.
You can assume that the second biggest value actual exists (there is at least two distinct values in the array),
and that all values in the array are greater than
[!python] -100000000.[/!]
[!java|scala]Integer.MIN_VALUE
(which is the smallest representable integer existing in [!thelang]).[/!]