public class TopDownMergeSort<T extends java.lang.Comparable> extends MergeSort<T>
TopDownMergeSort recursively splits the array into sub-lists and merges them to produce a sorted list.
MergeSort
ARRAY_IS_EMPTY, DATA_TYPE_NOT_SUPPORTED_YET, DECIMAL_RADIX, DELIMITER_COMMA, ELEMENT_NOT_FOUND, LIST_IS_EMPTY, OPERATION_NOT_SUPPORTED_YET
Constructor and Description |
---|
TopDownMergeSort() |
Modifier and Type | Method and Description |
---|---|
void |
sort(T[] objects)
Steps: (0) if list is of size=1, return as is (i.e. |
ListNode<T> |
sortList(ListNode<T> head) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkArray, checkIntArray, checkList
public void sort(T[] objects)