title: Stability of quicksort partitioning approach
body: <p>Does the following Quicksort partitioning algorithm result in a stable sort (i.e. does it maintain the relative position of elements with equal values):</p>
  
  <pre><code>  partition(A,p,r)
    {
       x=A[r];
       i=p-1;
       for j=p to r-1
         if(A[j]&lt;=x)
            i++;
            exchange(A[i],A[j])
  
         exchang(A[i+1],A[r]); 
       return i+1;
     }
  </code></pre>