Quick-sort (2)
To sort a[left…right] into ascending order:
1. If left < right: 1.1. Partition a[left…right] such that a[left…p–1] are all less than or equal to a[p], and a[p+1…right] are all greater than or equal to a[p]. 1.2. Sort a[left…p–1] into ascending order. 1.3. Sort a[p+1…right] into ascending order.2. Terminate.