Difference between revisions of "QuickSort"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> procedure QuickSort(var Values: TIntegerArray); </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Uses the [...") |
|||
Line 5: | Line 5: | ||
==Availability== | ==Availability== | ||
− | SCAR Divi 3. | + | SCAR Divi 3.14 > Current |
==Description== | ==Description== |
Revision as of 23:26, 1 July 2011
Definition
procedure QuickSort(var Values: TIntegerArray);
Availability
SCAR Divi 3.14 > Current
Description
Uses the quicksort sorting algorithm to sort a given set of integer values specified by the TIntegerArray Values. The values will be sorted small->large.
Example
var Values: TIntegerArray; i: Integer; begin Values := [9, 1, 8, 2, 4]; QuickSort(Values); for i := Low(Values) to High(Values) do WriteLn(Values[i]); end.
Output:
1 2 4 8 9