title: Quick sort with middle element as pivot
body: <p>My understanding of quick sort is</p>
  
  <ol>
  <li>Choose a pivot element (in this case I am choosing middle element as
  pivot)</li>
  <li>Initialize left and right pointers at extremes.</li>
  <li>Find the first element to the left of the pivot which is greater than pivot.</li>
  <li>Similarly find the first element to the right of the pivot which is smaller than pivot</li>
  <li>Swap elements found in 3 and 4. </li>
  <li>Repeat 3,4,5 unless left >= right. </li>
  <li>Repeat the whole thing for left and right subarray as pivot is now placed at its place.</li>
  </ol>
  
  <p>I am sure I am missing something here and being very stupid. But above does not seems to be working fot this array:</p>
  
  <pre><code>  8,7,1,2,6,9,10,2,11 pivot: 6  left pointer at 8, right pointer at 11
    2,7,1,2,6,9,10,8,11 swapped 2,8  left pointer at 7, right pointer at 10
  </code></pre>
  
  <p>Now what ? There is no element smaller than 6 on it's right side. 
   How 7 is going to go to the right of 6 ?</p>