Quicksort
Divide and conquer sorting algorithm

Summary
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.
Originally created by Kragen
10/29/2001, 7:25:18 AM
Modified
5/7/2026, 8:26:31 AM
Recent revisions
/* Algorithm */ Overhaul description. Make small-array handling a separate (optional) numbered section, and make the description of partitioning more linear, with fewer exceptions, while still generalizing to fat pivots. Move the point about the pivot being in the correct place already to the last (recursion) step to shorten the lengthy partitioning description.
Added category
Tidying, template
Added ref, infobox update
/* History */
/* History */ Added Hoare's theoretical analysis
/* growthexperiments-addlink-summary-summary:2|0|1 */
adding some spaces
Grammar / redundant
clean up, replaced: {{PAGENAMEBASE}} → {{subst:PAGENAMEBASE}}
/* History */
/* History */
Reverted 1 edit by [[Special:Contributions/~2025-43197-37|~2025-43197-37]] ([[User talk:~2025-43197-37|talk]]): Linkspam
Add link to online demo of bubble, quick and merge sort
/* growthexperiments-addlink-summary-summary:3|0|0 */
/* Using percentiles */
/* Using percentiles */
Altered date. | [[:en:WP:UCB|Use this bot]]. [[:en:WP:DBUG|Report bugs]]. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox2 | #UCB_webform_linked 256/995
Dating maintenance tags: {{Citation needed}}
/* Formal analysis */