title: Using tuples in a Heap for multidimensional sorting?
body: <p>Say I have a list such as:</p>
  
  <pre><code>[(3,4), (4,3), (1,5), (5,1), (2,6), (6,2)]
  </code></pre>
  
  <p>where I want to return the tuple with the lowest x-value, and also one with the lowest y-value.</p>
  
  <p>Is it possible to build a (min-)heap using index 0, and a different heap using index 1? That would make two heaps:</p>
  
  <pre><code>for x: [(1,5), (2,6), (3,4), (4,3), (5,1), (6,2)]
  #and
  for y: [(5,1), (6,2), (4,3), (3,4), (1,5), (2,6)].
  </code></pre>
  
  <p>Can we use heapsort for tuples?</p>