title: C#: Efficient algorithm to find greatest m elements in an N x N matrix
body: <p>I would like to know if there's an efficient algorithm to find the greatest m elements in an N x N matrix, with a method header like this:</p>
  
  <pre><code>double[] greatestValues(double[][] matrix, int numberOfElements);
  </code></pre>
  
  <p>Any ideas?</p>