title: How to find max in a list of tuples?
body: <p>I have the following list of tuples:</p>
  
  <pre><code>val arr = List(('a',10),('b',2),('c',3))
  </code></pre>
  
  <p>How to find the tuple with the max key or max value?</p>
  
  <p>The proper answer should be <code>(c, 3)</code> for max key lexicographically or <code>('a', 10)</code> for max value.</p>