title: [QuickSort]Recursion Problems
body: <p>When I was running my QuickSort code, and input the numbers.
  There was no output at all.
  I do not know the problem.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  void quickSort(int *pA, int left, int right) {
      int i, j, t, temp;
      temp = pA[left];
      i = left;
      j = right;
      while (i != j) {
          while (i &lt; j &amp;&amp; pA[j] &gt;= temp)
              j--;
          while (i &lt; j &amp;&amp; pA[i] &lt;= temp)
              i++;
          if (i &lt; j) {
               t = pA[i];
               pA[i] = pA[j];
               pA[j] = t;
          }
      }
       pA[left] = pA[i];
       pA[i] = temp;
       quickSort(pA, left, i - 1);
       quickSort(pA, i + 1, right);
  }
  
  int main() {
      int i, n, a[100];
      printf("please input the total of numbers:");
      scanf("%d", &amp;n);
      for (i = 0; i &lt; n; i++) {
          printf("number %d is:", i + 1);
          scanf("%d", &amp;a[i]);
      }
      quickSort(&amp;a, 0, n - 1);
      for (i = 0; i &lt; n; i++) {
          printf("%d ", a[i]);
      }
      return 0;
  }
  </code></pre>
  
  <p>Next was the code running picture:
  <a href="https://i.stack.imgur.com/Gi78E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gi78E.png" alt="enter image description here"></a></p>