IdentificationDivision. Program-Id. quicksort isrecursive. author. Robert Sedgewick. * Quicksort * aus Algorithmen p148 DataDivision. Working-StorageSection. 78 N value1000. 77 v pic9(4). 77 t pic9(4). 77 i pic9(4). 77 j pic9(4). LinkageSection. 01 a pic9(1) occurs N. 77 l pic9(4). 77 r pic9(4). ProcedureDivisionusing a l r. if r>1then move a(r) to v subtract1from l giving i move r to j Move0to a(1) Performuntil j<=i withtestafter Performuntil a(i)>=v withtestafter add1to i end-perform Performuntil a(j)<=v withtestafter subtract1from j end-perform move a(i) to t move a(j) to a(i) move t to a(j) end-perform move a(i) to a(j) move a(r) to a(i) move t to a(r) subtract1from i giving t call quicksort using a i t add1to i giving t call quicksort using a t r end-if End-Program quicksort.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-09)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.