title: Finding minimum number in an array with recursion
body: <p>when i dissect the logic of my code, it makes sense to me and looks like it should work. I need to find and return the smallest number in an array using recursion. here is my code </p>
  
  <pre><code>public static int findMin(int[] numbers, int start, int last)
  {
      int min = numbers[start]; // sets first value in array to minimum
  
      if(numbers[start]&lt;numbers[last]&amp;&amp; numbers[start]&lt;min)
      {   // if 1st value &lt; last value in array and 1st value smaller than min, set min to first value
          min = numbers[start];
  
      }
      else if(numbers[start]&gt;numbers[last]&amp;&amp; numbers[last] &lt; min)
      {   // if 1st value &gt; last value and last value &lt; min, set min to last value
          min = numbers[last];
      }
      else
      {   // if 1st and last value are equal returns 1st value
          return numbers[start];
      }
          // recursively calls... or not
      findMin(numbers, start+1, last-1);
      return min;
  }
  </code></pre>
  
  <p>inputs used are 33
  -55, -44, 12312, 2778, -3, -2, 53211, -1, 44, 0</p>
  
  <p>output getting: </p>
  
  <p>The minimum number is 0
  Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
      at Assignment9.countEven(Assignment9.java:72)
      at Assignment9.countEven(Assignment9.java:87)
      at Assignment9.main(Assignment9.java:34)</p>
  
  <p>Expected: -55</p>
  
  <p>i am assuming my recursive call is incorrectly placed. Please help, thank you. </p>