翻訳と辞書
Words near each other
・ quest
・ question mark
・ queue
・ queued sequential access method
・ quick
・ quick mail queueing protocol
・ quick mail transfer protocol
・ quick-and-dirty
・ quickdraw
・ quicksilver
quicksort
・ quicktime
・ quiesce
・ quiesce time
・ quikscript
・ quiktran
・ quin
・ quine
・ quintec-objects
・ quintillion


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

quicksort : FOLDOC
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 ] ++
qsort [ u | u<-xs, u>=x ]

[Mark Jones, Gofer prelude.]



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.