public final class IterativeMergeSort extends Object
Comparator.
This implementation uses an iterative implementation approach over the more classical recursive approach in order to save the auxiliary space required by the call stack in recursive implementations.
Complexity:| Modifier and Type | Method and Description |
|---|---|
static <T> void |
sort(List<T> list,
Comparator<? super T> cmp)
Sorts this list according to the order induced by the specified
Comparator. |
public static <T> void sort(List<T> list, Comparator<? super T> cmp)
Comparator.T - the class of the objects in the listlist - the list to be sorted.cmp - the comparator to determine the order of the list.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.