This is a interview question: given an array of integers find the max. and min. using minimum comparisons.
Obviously, I can loop over the array twice and use ~
~
Just loop over the array once, keeping track of the max and min so far.