-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsortTest.java
More file actions
36 lines (26 loc) · 787 Bytes
/
sortTest.java
File metadata and controls
36 lines (26 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* Brett Waugh
* 3 December 2019
* sortTest.java
* Program creates a set of random data,
* then runs various sorting algorithms
* against the data to see how efficient
* each algorithm is. Times are reported
* in milliseconds at the end.
*/
public class sortTest {
public static void main(String[] args) {
int start = getTime.time();
// START PROCESS HERE !!!
int max = 10000;
System.out.println("Data points : " + max);
// Creates datasets.
int[] data = makeData.randomArr(max);
linked li = makeData.randomLi(data);
Heap theHeap = makeData.randomHeap(data, max);
outputData.writeDat(data, li, theHeap, max);
int end = getTime.time();
int elapsed = end - start;
System.out.println("Whole program : " + elapsed + " milliseconds.");
}
}