quicksort

Computing Dictionary

Quicksort definition


A sorting algorithm with O(n log n) average time complexity.
One element, x of the list to be sorted is chosen and the other elements are split into those elements less than x and those greater than or equal to x. These two lists are then sorted recursively using the same algorithm until there is only one element in each list, at which point the sublists are recursively recombined in order yielding the sorted list.
This can be written in Haskell:
qsort :: Ord a => [a] -> [a] qsort [] = [] qsort (x:xs) = qsort [ u | u<-xs, u=x ]
[Mark Jones, Gofer prelude.]

The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source

00:10

00:09

00:08

00:07

00:06

00:05

00:04

00:03

00:02

00:01

Quicksort is always a great word to know.
So is quincunx. Does it mean:
an arrangement of five objects, as trees, in a square or rectangle, one at each corner and one in the middle.
a printed punctuation mark (‽), available only in some typefaces, designed to combine the question mark (?) and the exclamation point (!), indicating a mixture of query and interjection, as after a rhetorical question.
Dictionary.com, LLC. Copyright © 2012. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature
FAVORITES
RECENT