title: Is it possible to find the largest drop between two numbers in an array in less than O(n²) complexity?
body: <p>i have an array full of numbers.
  i need to find the maximum different between 2 numbers but the biggest number is before the smallest number in the array.</p>
  
  <pre><code>public static int maximalDrop (int [] a)
  </code></pre>
  
  <p>For example:</p>
  
  <p>for the array 5, 21, 3, 27, 12, 24, 7, 6, 4 the result will be 23 (27 - 4)</p>
  
  <p>for the array 5, 21, 3, 22, 12, 7, 26, 14 the result will be 18 (21 - 3)</p>
  
  <p>My solution is take the first element in the array (this number will be the big) and check the the difference between this number and all other numbers in the array and after that do the same thing but with the next number in the array and of course compare the difference and return the biggest one.
  i thing that my solution is O(n²) so can i do that in less ?</p>