How could i generate and print the worst case set for Quick Sort considering as pivot the middle element?. This is my implementation of quicksort algorithm:
  void quickSort(int arr[], int left, int right) {
     int index = partition(arr, left, right);
        if (left < index - 1)
           quickSort(arr, left, index - 1);
        if (index < right)
           quickSort(arr, index, right);
 }
 int partition(int arr[], int left, int right){
  int i = left, j = right;
  int tmp;
  int pivot = arr[(left + right) / 2];
   while (i <= j) {
        while (arr[i] < pivot)
               i++; 
       while (arr[j] > pivot)
              j--;
        if (i <= j) {
              tmp = arr[i];
              arr[i] = arr[j];
              arr[j] = tmp;
              i++;
              j--;
        }
  };
  return i;
 }
Any idea of how to generate the worst case for this algorithm?.