title: Clarify the swap criteria in a Quicksort?
body: <p>In a quicksort, the idea is you keep selecting a pivot. And you swap the a value you find on the left that is greater than the pivot with a value you find on the right which is less than the pivot.  see: <a href="http://www.vogella.com/articles/JavaAlgorithmsQuicksort/article.html" rel="nofollow">ref</a></p>
  
  <p>Just want to be 100% sure what happens in the following cases:</p>
  
  <ul>
  <li>No value on left greater than pivot, value on right less than pivot</li>
  <li>Value on left greater than pivot, no value on right less than pivot</li>
  <li>No value on left greater than pivot, no value on right less than pivot</li>
  </ul>