Quicksort


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.]

Read Also:

  • Quickstep

    [kwik-step] /ˈkwɪkˌstɛp/ noun 1. (formerly) a lively used in marching. 2. music adapted to such a march, or in a brisk march rhythm. 3. a lively or combination of in ballroom dancing. /ˈkwɪkˌstɛp/ noun 1. a modern ballroom dance in rapid quadruple time 2. a piece of music composed for or in the rhythm of […]

  • Quick-tempered

    [kwik-tem-perd] /ˈkwɪkˈtɛm pərd/ adjective 1. easily angered. adjective 1. readily roused to anger; irascible

  • Quick-study

    noun 1. someone who is able to learn a new job or adjust to a new social environment in a short time. 2. an actor who can learn lines and become proficient in a role on short notice.

  • Quickthorn

    /ˈkwɪkˌθɔːn/ noun 1. hawthorn, esp when planted as a hedge

  • Quicktime

    graphics, standard, file format, product Apple Computer’s standard for integrating full-motion video and digitised sound into application programs. [Details? Archives?] (1995-04-21)


Disclaimer: Quicksort definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.