Class: Sorting::QuickSort
- Inherits:
-
Object
- Object
- Sorting::QuickSort
- Extended by:
- Helper
- Defined in:
- lib/sorting/quick_sort.rb
Constant Summary collapse
- TEST_DATA_SIZE =
100_000- SIZE_FOR_INSERTION =
12
Class Method Summary collapse
-
.sort!(data) ⇒ Object
Quick sort Comparison sort Partitioning Unstable(in efficient implementations) Time complexity: O(nlogn), Ө(nlogn), O(n2) Space complexity: O(logn) Support parallelization Median-of-3 killer.
Methods included from Helper
Class Method Details
.sort!(data) ⇒ Object
Quick sort Comparison sort Partitioning Unstable(in efficient implementations) Time complexity: O(nlogn), Ө(nlogn), O(n2) Space complexity: O(logn) Support parallelization Median-of-3 killer
17 18 19 20 |
# File 'lib/sorting/quick_sort.rb', line 17 def self.sort!(data) quicksort(data) nil end |