title: How to find max. and min. in array using minimum comparisons?
body: <p>This is a interview question: given an array of integers find the max. and min. using minimum comparisons.</p>
  
  <p>Obviously, I can loop over the array twice and use <code>~2n</code> comparisons in the worst case but I would like to do better.</p>