| Date Assigned: | Tue Nov-21 |
| Date Due: | Thu Nov-30 |
0. Notes:
a) we will have a *double*quiz on Monday Dec-4 (by that I mean that
your score on the quiz will count for two quizzes in the grade book).
That quiz will cover all 4 sorting algorithms which you must know by then.
Namely:
selectionSort (assignment 20)
insertionSort (assignment 21)
bubbleSort (assignment 23)
mergeSort (assignment 23)
You will be expected to write all 4 of these sorts in one class period. The *only* way to accomplish this is to *thoroughly* understand them by then. Your best bet is to practice by starting from a blank compiler (though I will provide you with loadVector(), printVector(), etc -- just focus for now on the sorting algorithms themselves) and verifying that you can write all 4 sorting algorithms in under 40 minutes. You have 9 days until that quiz, which is plenty of time to master this material. Good luck!
b) You may not work with others on this assignment.
c) Good luck!
Please ignore the other header notes -- steps 0, 1, and 4. Just focus on steps 2 and 3.
Note that while there are 6 functions for you to write, loadVector, printVector, insertionSort, and selectionSort are all review, as you have written all of them recently for other assignments. Thus, the only two functions you really need to write are: bubbleSort and mergeSort. Thus, this is far less ambitious an assignment than it may seem at first blush.
Also note that this assignment includes some code which may seem quite foreign to you. In particular, the signature for testSortFunction. Do not fret, however, because you are not responsible for that code. The only code you are responsible for understanding is the code you are asked to provide.
DK