Answered step by step
Verified Expert Solution
Question
1 Approved Answer
my teacher wants us to find the efficiency using a data set of 2000 elements. she says to put It into a text file. i
my teacher wants us to find the efficiency using a data set of 2000 elements. she says to put It into a text file. i have no idea how to do that. here I show an example of another part of this project where we find the efficiency of an 3 (differently ordered) arrays with the size of 10
I am assuming it has a similar structure. we use scanner class to read input files.
Step 2: Experimenting with large data sets of 2000 elements. The results must be reported in the same table format. In addition in the report, explain the empirical results generated by your program comparing them to the known theoretical results paying special attention to any discrepancies which must be clearly explained Must submit for grading: the java code ONLY and the report (Word document) containing your empirical results as explained above and MOST IMPORTANTLY the analysis of this results what do they suggest, are they consistent with expected (theoretical) results, why - explain the algorithms, how the algorithms compare based on YOUR results. Also report everything that deviates from expectations and explain it. Note that this report is 95% of the grade - the code is supplemental necessity to allow you to write the report. public class SortsPrepSelection { public static void main (String [] args) { System.out.println (" System.out.println ("Testing selection sort: "); int[] arrayselection int[] array2Selection int[] array3Selection {1, 2, 3, 4, 5, 6, 7, 8, 9, 10); (10, 9, 8, 7, 6, 5, 4, 3, 2, 1); {1, 3, 2, 5, 4, 7, 9, 6, 8, 10); --- System.out.println (" best case ---"); selectionSort (arraySelection); System.out.println (" worst case ---"); selectionsort (array2Selection); System.out.println ( avarage case selectionsort (array3Selection); ---"); System.out.println(" -- public static void selectionsort (int[] array) { int temp, min, exchanges o, comparisons = 0; int numberofitems = array.length; for (int pass=0; pass != numberofitems 1; pass++) { min = pass; for (int index = pass+1; index != numberOfItems; index++) { comparisons++; if (array[index]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started