Finding first negative number in a monotonically decreasing array using recursion
<p>How would I implement a recursive code to return the first negative number in an already sorted array? I was doing </p>

<pre><code>int counter = 0;
private int findNum(int[] a){

    if(a[counter] &lt; 0)
     return a[counter];

  else
       counter++;
       return findNum(a);
</code></pre>

<p>this code runs in Order n time. However, I believe there may be a faster way of doing this by using something like a binary search, but I haven't figured it out yet. Does anybody know a faster way?</p>