Class MergeSort

MergeSort

public class MergeSort

Purpose: Arranges an integer array in ascending order.
Description:
Algorithm: Merge Sort - Acquires an integer array and divides it into two sections. Recursively sorts each group, and then merges them into a sorted array.
Big O Analysis: Merge Sort - O(n log n).

Version:
1.0 Reference: Java Methods An Introduction to Object oriented programming, Maria Litvin, Gary Litvin, Skylight Publishing, 2001, p. 336
Author:
T. K. Rogers

Constructor Summary
MergeSort()
          Constructor for objects of class MergeSort
 
Method Summary
 long getSortTime(int[] y)
          Applies merge sort to an array in ascending order.
 void sort(int[] z)
           
 

Constructor Detail

MergeSort

public MergeSort()
Constructor for objects of class MergeSort
Method Detail

getSortTime

public long getSortTime(int[] y)
Applies merge sort to an array in ascending order.

sort

public void sort(int[] z)


Generated by BlueJ