整列(ソート)すべきデータ列の項目の中からランダムに任意の項目を選び(中央値),列中の最初の項目から逐次内側に向って中央値の項目と比較し,逆順になっている項目が見つかるまでこの操作を繰り返す.次に,列中の最後部の項目からはじめて逐次内側に向って中央値の項目と比較し,正順になっている項目が見つかるまでこの操作を繰り返す.このようにして見つかった二つの項目の場所を交換する.この走査と交換という操作を中央値の場所に達するまで繰り返す.この結果,中央値の項目を境にして正順の項目と逆順の項目に分割される.さらに分割された各部分に対して上と同じ操作と交換の操作を繰り返し,最後に比較の対象となる項目が1個になった時点で整列が終了する.
出典:Wiktionary
出典:『Wiktionary』 (2025/07/13 19:50 UTC 版)
From Quick + sort, from its computational efficiency.
quicksort (plural quicksorts)
quicksort (third-person singular simple present quicksorts, present participle quicksorting, simple past and past participle quicksorted)
出典:Wikipedia
出典:『Wikipedia』 (2011/07/02 00:39 UTC 版)
Quicksort is a sorting algorithm developed by Tony Hoare that, on average, makes O(nlogn) (big O notation) comparisons to sort n items. In the worst case, it makes O(n2) comparisons, though this behavior is usually rare. Quicksort is often faster in practice than other O(nlogn) algorithms. Additionally, quicksort's sequential and localized memory references work well with a cache. Quicksort can be implemented as an in-place sort, requiring only O(logn) additional space.