Skip to content

Commit

Permalink
[qsort] more accurate description of imperative two ways partition
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinyu95 committed Oct 10, 2015
1 parent e41fca8 commit fadb35a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sorting/dc-sort/dcsort-en.tex
Expand Up @@ -908,8 +908,7 @@ \subsubsection{2-way partition}
equal to the pivot, the situation at this stage is illustrated in figure \ref{fig:partition-2-way} (a).

In order to partition all elements less than or equal to the pivot to the left, and the others to the right,
we can exchange the two elements pointed by $i$, and $j$. After that the scan can be resumed until either
$i$ meets $j$, or they overlap.
we can exchange the two elements pointed by $i$, and $j$. After that the scan can be resumed. We repeat this process until either $i$ meets $j$, or they overlap.

At any time point during partition. There is invariant that all elements before $i$ (including the one
pointed by $i$) are not greater than
Expand Down

0 comments on commit fadb35a

Please sign in to comment.