title: Given an integer array of size n, find the k-th largest element without sorting the entire array
body: <p>I am having some problems with a sorting problem.</p>
  
  <p>The statement:</p>
  
  <p>Write a method <code>KthLargest()</code> that, given an array containing integers in some arbitrary order and an integer k, returns the k-th largest element in the array. Assuming that k is a small number and n is a very large number, your algorithm should be as fast as possible in terms of the worst-case number of comparisons, so do not sort the entire array of size n to find out the k-th largest element. You may use the Arrays.sort() method provided in the Java library.</p>
  
  <p>I have clear ideas on how to do this problem... That is if I can sort the entire array first.</p>
  
  <pre><code>public static int KthLargest(int[] inputArray, int k)
  {
      Arrays.sort(inputArray);
      return inputArray[k];
  }
  </code></pre>
  
  <p>However, the problem statement specifically states that I must not sort the entire array. </p>