Final round of the sorting lab competition.

Problem description

Develop a sorting algorithm to sort words in a long text file (a few thousand words) by the following criteria: by word length as a primary criteria and alphabetically as a secondary one. This means that all shorter words come before all longer words and within each group of words of the same length the words are sorted alphabetically (more precisely, according to compareTo method of String class).

Your goal is to develop an algorithm that sorts as fast as possible. "Fast" here means direct timing of the program, not just the Big-Theta approximation.

More details about the lab are posted here.

Results of the final round.

These are the results of the final round of the lab. The test was run on discovery in /tmp. There are two data files (see below).

Long file (1 round)

The input file is here.

The script ran each program with 1 round of sorting 6 times. All 6 timing results are displayed. It then checked whether the output file was sorted and displayed the word count for the output file. The correct word count is 215137.



 Group1 Jared: 

175
176
169
175
172
168
Congratulations! Your sorting is correct.
215137 out1.txt

 Group2 Michael, Denver: 

533
571
570
535
575
572
Congratulations! Your sorting is correct.
215137 out2.txt

 Group3 Jeff, Lucas: 

152
144
150
144
149
152
Congratulations! Your sorting is correct.
215137 out3.txt

 Group4 Niko, Martha: 

543
543
550
549
550
546
Congratulations! Your sorting is correct.
215137 out4.txt

 Group5 Fu, Greg: 

123
126
122
121
126
122
Congratulations! Your sorting is correct.
215137 out5.txt

 Group6 Isaac, Eugene: 

Total Time: 473 for 1 loops.
Total Time: 466 for 1 loops.
Total Time: 463 for 1 loops.
Total Time: 466 for 1 loops.
Total Time: 475 for 1 loops.
Total Time: 460 for 1 loops.
Congratulations! Your sorting is correct.
215137 out6.txt

 Group7 Asher, Jason: Note: the result is one line short. 

712
872
683
680
716
682
Congratulations! Your sorting is correct.
215136 out7.txt

 Group8 Tim, Casey:  

212
220
214
222
213
212
Congratulations! Your sorting is correct.
215137 out8.txt

 Group9 Martin: 

721
731
720
686
704
717
Congratulations! Your sorting is correct.
215137 out9.txt

 Group10 Jeff, Lucas: 

362
356
356
361
355
361
Congratulations! Your sorting is correct.
215137 out10.txt

Shorter file (10 rounds)

The input file is here.

The script ran each program with 1 round of sorting 6 times. All 6 timing results are displayed. It then checked whether the output file was sorted and displayed the word count for the output file. The correct word count is 24240.


 Group1 Jared: 

207
182
198
188
208
190
Congratulations! Your sorting is correct.
24240 out1.txt

 Group2 Michael, Denver: 

573
593
570
578
586
580
Congratulations! Your sorting is correct.
24240 out2.txt

 Group3 Jeff, Lucas: 

131
133
132
132
133
138
Congratulations! Your sorting is correct.
24240 out3.txt

 Group4 Niko, Martha: 

202
31
23
24
24
29
25
26
26
26
202
34
40
37
26
29
26
25
15
8
195
33
40
37
26
28
25
26
18
8
202
31
24
24
23
27
26
26
25
25
202
32
24
24
24
26
25
26
26
26
201
33
40
37
26
28
25
25
18
8
Congratulations! Your sorting is correct.
24240 out4.txt

 Group5 Fu, Greg: 

187
138
175
177
176
175
Congratulations! Your sorting is correct.
24240 out5.txt

 Group6 Isaac, Eugene: 

Total Time: 417 for 10 loops.
Total Time: 415 for 10 loops.
Total Time: 414 for 10 loops.
Total Time: 414 for 10 loops.
Total Time: 418 for 10 loops.
Total Time: 417 for 10 loops.
Congratulations! Your sorting is correct.
24240 out6.txt

 Group7 Asher, Jason: 

684
679
670
662
651
659
Congratulations! Your sorting is correct.
24239 out7.txt

 Group8 Tim, Casey: 

240
239
194
237
191
238
Congratulations! Your sorting is correct.
24240 out8.txt

 Group9 Martin: 

576
659
532
573
572
578
Congratulations! Your sorting is correct.
24240 out9.txt

 Group10 Jeff, Lucas: 

397
399
397
393
354
417
Congratulations! Your sorting is correct.
24240 out10.txt

CSci 3501 course web site.