public class MergeSort
extends java.lang.Object
| Constructor and Description |
|---|
MergeSort() |
| Modifier and Type | Method and Description |
|---|---|
static void |
mergeSort(int[] arr,
int p,
int r)
It is a divide-and-conquer algorithms
Time complexity: Θ(nlogn) in the worst and best case
Space complexity; O(n) total with O(n) auxiliary the algorithms is not in place
|