I need to write a counting sort using c++ and I have put it here:
http://codepad.org/MpTugOur
Everything works, but counting sort is really slow. My program has been running for almost 12 hours and hasn't gone half way through.
Specifically, my counting sort starts with line 564. My main program file is here: http://codepad.org/qI5yLfxV
The instructor was us to run the program with 4 million in the command line argument. Specifically, the program seems to be taking longest doing counting sort using 4 million.
I am not to modify the main.cpp file. Only the sorting file is modified in the assignment. Did I write the counting sort correctly?
http://codepad.org/MpTugOur
Everything works, but counting sort is really slow. My program has been running for almost 12 hours and hasn't gone half way through.
Specifically, my counting sort starts with line 564. My main program file is here: http://codepad.org/qI5yLfxV
The instructor was us to run the program with 4 million in the command line argument. Specifically, the program seems to be taking longest doing counting sort using 4 million.
I am not to modify the main.cpp file. Only the sorting file is modified in the assignment. Did I write the counting sort correctly?
