Metraipolis › archive › dc_2248093a7365
Quicksort — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Quicksort
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-07T21:49:07.135Z
- SHA-256 of the archived text
f5e1d0a08bc987270bececb3ba54acd3246568205155649eaf0515187971a574- Stable URL of this page
https://metraipolis.com/documento/dc_2248093a7365
How to cite
Quicksort — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Quicksort (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_2248093a7365 (Metraipolis archive dc_2248093a7365, sha256 f5e1d0a08bc987270bececb3ba54acd3246568205155649eaf0515187971a574)
BibTeX
@misc{dc2248093a7365,
title = {Quicksort — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Quicksort},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_2248093a7365; sha256 f5e1d0a08bc987270bececb3ba54acd3246568205155649eaf0515187971a574},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Quicksort. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Quicksort is an efficient, general-purpose sorting algorithm. Quicksort was developed by British computer scientist Tony Hoare in 1959 and published in 1961. It is still a commonly used algorithm for sorting. Overall, it is slightly faster than merge sort and heapsort for randomized data, particularly on larger distributions. Quicksort is a divide-and-conquer algorithm. It works by selecting a "pivot" element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. For this reason, it is sometimes called partition-exchange sort. The sub-arrays are then sorted recursively. This can be done in-place, requiring small additional amounts of memory to perform the sorting. Quicksort is a comparison sort, meaning that it can sort items of any type for which a "less-than" relation (formally, a total order) is defined. It is a comparison-based sort since elements a and b are only swapped in case their relative order has been obtained in the transitive closure of prior comparison-outcomes. Most implementations of quicksort are not stable, meaning that the relative order of equal sort items is not preserved. Mathematical analysis of quicksort shows that, on average, the algorithm takes O ( n log n ) {\displaystyle O(n\log {n})} comparisons to sort n items. In the worst case, it makes O ( n 2 ) {\displaystyle O(n^{2})} comparisons.
Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; ricerca «algorithm»).
Fonte: Wikipedia in inglese, voce «Quicksort» — https://en.wikipedia.org/wiki/Quicksort
Wikidata Q486598 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q486598
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Quicksort?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1377696753, consultata il 2026-10-07T21:24:13.174Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: b817894a5295ac19ade0e1dbcf237a8b963821e8adb7078c43afc4965e2fb14e