STFC Website

part of UK Research & Innovation

Version 1.0.0

12th July 2004

KB07: Sort numbers into ascending order with indexing using Quicksort

To sort an array of numbers into ascending order maintaining an index array to preserve a record of the original order. The quicksort algorithm is used.