@@ -37,19 +37,20 @@ static float estimate_sorting_duration(sorting_algorithm algorithm, ArrayList<Ar
37
37
38
38
public static void main (String args [])
39
39
{
40
- int number_of_tests = 10 , test_size = 1900 ;
41
- ArrayList <ArrayList <Integer >> tests = new ArrayList <ArrayList <Integer >>(number_of_tests );
40
+ int number_of_tests = 10 , test_size = 10000 ;
41
+ ArrayList <ArrayList <Integer >> set_of_tests = new ArrayList <ArrayList <Integer >>(number_of_tests );
42
42
43
43
for (int i = 0 ; i < number_of_tests ; i ++)
44
- tests .add (randomize_new_array (test_size ));
44
+ set_of_tests .add (randomize_new_array (test_size ));
45
45
46
46
bubble bubble_sort = new bubble ();
47
47
insert insert_sort = new insert ();
48
+ select select_sort = new select ();
48
49
quick quick_sort = new quick ();
49
50
50
- System .out .println (estimate_sorting_duration (bubble_sort , tests ) );
51
- System .out .println (estimate_sorting_duration (insert_sort , tests ) );
52
- System .out .println (estimate_sorting_duration (quick_sort , tests ) );
53
- // System.out.println(estimate_sorting_duration(quick_sort, tests) );
51
+ System .out .println (estimate_sorting_duration (bubble_sort , set_of_tests ) + " [ms]" );
52
+ System .out .println (estimate_sorting_duration (insert_sort , set_of_tests ) + " [ms]" );
53
+ System .out .println (estimate_sorting_duration (select_sort , set_of_tests ) + " [ms]" );
54
+ System .out .println (estimate_sorting_duration (quick_sort , set_of_tests ) + " [ms]" );
54
55
}
55
56
}
0 commit comments