editing sort type strings

This commit is contained in:
2020-06-08 12:35:00 -05:00
parent d3398c9b65
commit cb3dca5d62
7 changed files with 9 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ public class AlgorithmTester{
int input;
boolean ready=false;
boolean print=false;
String[] sortingAlgoNames = {"bubble","selection","insertion","counting","quick","3-way partitioned quick","merge"};
String[] sortingAlgoNames = {"bubble sort","selection sort","insertion sort","counting sort","quick sort","quick sort (3-way partition)","merge sort"};
boolean[] sortingAlgoChoices = new boolean[sortingAlgoNames.length];
System.out.print("\nPlease enter file name: ");
filename = sc.next();
@@ -168,8 +168,9 @@ public class AlgorithmTester{
for(int i: e.getSortedArray()){
System.out.print(i+" ");
}
System.out.print("\n");
}
System.out.println("\n"+e.getSortType()+" sort of "+e.getSortCount()+" numbers took:");
System.out.println("\n"+e.getSortType()+" of "+e.getSortCount()+" numbers took:");
System.out.println(e.getComparisonsUsed()+" comparisons");
System.out.println(e.getWritesUsed()+" write operations");
System.out.println(e.getTimeUsed()+" milliseconds");