GenericQuickSort<T extends Comparable> class
Generic Quick Sort for any Comparable type with hybrid optimization.
Features:
- Fast average-case performance O(n log n)
- In-place sorting with O(log n) space complexity
- Hybrid approach: switches to insertion sort for small subarrays
- Median-of-three pivot selection to avoid worst-case
- Tail recursion optimization
Best for:
- Large datasets with good cache performance requirements
- Custom objects where comparison is fast
- Memory-constrained environments
- General-purpose sorting when stability is not required
Constructors
- GenericQuickSort.new()
- Creates a generic quick sort strategy for type T.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- meta → AlgoMetadata
-
Metadata describing this strategy's characteristics and requirements
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canApply(
List< T> input, SelectorHint hint) → bool -
Fast check if this strategy can be applied to the given input and hint.
override
-
execute(
List< T> input) → List<T> -
Execute the algorithm on the given input.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited