Changes to Quicksort
TechWritereditor · 5 Dec 2026, 04:28 · “New page”
+ added − removed (first version)
Title
Removed:
Added: Quicksort
Short description
Removed:
Added: Divide-and-conquer sorting algorithm by Tony Hoare
Type
Removed:
Added: technology
Summary
Removed:
Added: Quicksort is a fast sorting algorithm invented by Tony Hoare in 1959 and published in 1961. It repeatedly splits a list around a chosen "pivot" value and is still among the most widely used sorting methods.
Fact box
Removed:
Added: Type: Sorting algorithm
Added: Inventor: Tony Hoare
Added: Devised: 1959
Added: Published: July 1961
Added: Average time: O(n log n)
Added: Worst-case time: O(n²)
Article
Added: **Quicksort** is an algorithm for putting a list of items, such as numbers or words, into order. It was invented by the British computer scientist [[Tony Hoare]] and published in July 1961, and it is still regarded as one of the best sorting algorithms, with implementations in many programming languages and libraries.[^1]
Added: ## History
Added: Hoare thought of the algorithm in 1959 while studying the machine translation of languages at Moscow State University.[^2][^3] A Russian-to-English translation system stored its dictionary on magnetic tape, so the words of a sentence had to be sorted into alphabetical order before they could be looked up.[^4] Hoare's first idea took time proportional to the square of the sentence length; quicksort was his second, better idea.[^4] He could not express it in Mercury Autocode, the only language he then knew, but on a course in [[ALGOL]] 60, a language that supported recursion, he realised that recursion made the algorithm easy to write.[^4][^5] Hoare received the ACM Turing Award in 1980 for his contributions to programming language design.[^5]
Added:
Added: ## How it works
Added: Quicksort is a "divide and conquer" method. It picks one element, called the pivot, and splits the remaining items into those smaller than the pivot and those larger. The same steps are then applied to each part in turn until every part has one or no elements, at which point the whole list is sorted.[^4] In Hoare's partitioning scheme, one pointer moves up from the bottom of the list and another down from the top; when they find items on the wrong side they swap them, until the pointers cross.[^4]
Added:
Added: The algorithm sorts in place, needing little extra memory, but it is not stable, meaning equal items may not keep their original order.[^4] On average it takes time proportional to n log n for n items, but a poor choice of pivot, for example always using the first item of a list that is already sorted, can make it as slow as n².[^4]
Added:
Added: ## See also
Added: - [[Tony Hoare]]
Added: - [[Dijkstra's algorithm]]
Added: - [[Huffman coding]]
Sources
Removed:
Added: Happy birthday Quicksort! | https://plus.maths.org/content/happy-birthday-quicksort-1 | Plus Magazine, University of Cambridge | 2021-06-04
Added: Sir Antony Hoare | https://computerhistory.org/profile/sir-antony-hoare/ | Computer History Museum
Added: Tony Hoare | https://www.britannica.com/biography/Tony-Hoare | Encyclopaedia Britannica
Added: Quicksort | https://cs.stanford.edu/people/eroberts/courses/soco/projects/2008-09/tony-hoare/quicksort.html | Stanford University
Added: C. Antony R. Hoare | https://amturing.acm.org/award_recipient/hoare_4622167 | Association for Computing Machinery
Categories
Removed:
Added: Algorithms
Other names
Removed:
Added: Quick sort
Added: Partition-exchange sort
Added: Hoare's sort