title: Stack overflow when I implement Quicksort method
body: <p>Hello I am trying to implement Quicksort method in Java, but for some reason I am getting a stack overflow error when I am doing as little as 5 elements! Any ideas what could be wrong? 
  Part of my Code:</p>
  
  <pre><code>class QuickSort implements AbstractSort {
      public int partition(int[] numbers, int start, int end)
      {
          int pivot = numbers[end];
          int theIndex = start;
          int temp;
          for(int i = start; i &lt;= end - 1; i++)
          {
              if(numbers[i] &lt;= pivot)
              {
                  temp = numbers[theIndex];
                  numbers[theIndex] = numbers[i];
                  numbers[i] = temp;
                  theIndex++;
              }
          }
          temp = numbers[theIndex];
          numbers[theIndex] = pivot;
          numbers[end] = temp;
          return theIndex;
      }
  
      public void mySort(int[] numbers, int start, int end)
      {
          if(start &lt; end)
          {
              int myIndex = partition(numbers, start, end);
  
              mySort(numbers, 0, myIndex-1);
              mySort(numbers, myIndex + 1, numbers.length - 1);
          }
          else
          {
              return;
          }
      }
      public void sort(int[] numbers) 
      {
          mySort(numbers, 0, numbers.length - 1);
      }
  }
  </code></pre>