title: Assistance with Quick Sort Algorithm to work with letter and number char values in one array
body: <p>I am writing a program that takes an input. This input gets placed in different arrays. Each array is of 'char' data type. I need to have each array organized from greatest to least in value. Each array represents a suit in playing cards; hearts, spades etc. The values that need to be organized are the values of these cards. The order hierarchy is as follows. A to K to Q to J to T (representing '10'), then 9 to 8 to 7 to 6 to 5 to 4 to 3 to 2. The problem I have is implementing the quick sort algorithm to work with letters and numbers alike. Here are my methods. </p>
  
  <pre><code>public static void quickSort (int a[], int start, int end)
  {
  if (start &lt; end)
  { 
    int split = partition (a, start, end);
  
     // show split
    System.out.println ("split " + split);
    System.out.println ("");
  
     // sort the left sublist
    quickSort (a, start, split);
  
     // now sort the right sublist
    quickSort (a, split + 1, end);
    }
  }
  
  public static int partition (int a[], int start, int end)
  { 
  int bottom = start - 1;
  int top = end + 1;
  
   // pick a value pivot.Arrange the list according to: &lt;= or &gt;= to pivot
  
  int pivot = a [start];
  
  System.out.println ("pivot is " + pivot);
  
   // walk bottom and top towards each other, using them to swap array
   // elements as we go, and stopping when bottom and top pass each other
  
  while (bottom &lt; top)
  {
     // walk until you find an element that is not in its current sublist
  
    do
    {
      bottom++;
    }
    while (a [bottom] &lt; pivot);
  
    do
    {
      top--;
    }
    while (a [top] &gt; pivot);
  
     // swap a[bottom] and a[top], thus putting the values in the
     // correct sublist
  
    int temp = a [bottom];
    a [bottom] = a [top];
    a [top] = temp;
  }
  
   // undo the last swap that took place after the bottom and top
   // indices passed each other
  
  int temp = a [bottom];
  a [bottom] = a [top];
  a [top] = temp;
  
   // finally, return split index
  return top;
  
  }
  }
  </code></pre>
  
  <p>Input: 4C3C6CTSTHAD2S8DACQHKS2D4H 
  Expected Output:
  Spades K 10 2 
  Hearts Q 10 4 
  Diamonds A 8 2 
  Clubs A 6 4 3 </p>
  
  <p>The output that I get is out of order. I call the method once for each suit.</p>