Completing the Program (15 points) This program prints a table of runtimes (these are displayed in seconds) for given functions on arrays. The program tests different array sizes to establish a relationship between input size and runtime. It tests each array size multiple times and then takes an average of the times. Here are example calls to the timing functions: int[] sizes1= { 1000, 2000, 4000, 8000, 16000}; fRT = timeAlgorithm("Insertion Sort", 10, 5, sizes1, "insertionSortInitial" ); printRuntimeTable(fRT); fRT = timeAlgorithm("quicksort", 10, 5, sizes1, "quickSortOptInitial" ); printRuntimeTable(fRT);
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 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 |