Compare your answers to HW6 and HW7 to the reference solutions. Look for places where your code is overly complex relative to the reference.
Direct links for convenience:
Work through the Guerrilla Section worksheet (link to be posted at 2 PM Sunday).
To test your understanding of the mechanics of sorting algorithms, answer the questions given in this slide.
Starter files for this assignment are available here. They will not be available via hw init.
MySortingAlgorithms.java provides a skeleton for implementing the various sorting algorithms from 61B. SortingAlgorithms.java provides solutions.
If you'd like, try implementing the sorting algorithms. If you're optimizing your study time, I'd recommend against doing any of the moderate (or harder) sorts. While you'll certainly gain a very deep understanding of these algorithms by implementing them, we don't expect you to understand various second-order issues (like auxiliary arrays, resizing for heapsort, bit hacking for LSD and MSD sort, etc) for 61B.
They are ranked in implementation difficulty below:
You can use MySortingAlgorithmsTest to test your implementations.
Alternately, simply copy and paste from SortingAlgorithms.java to MySortingAlgorithms.java. Be warned that the code for SortingAlgorithms is a bit messy.
The RunBenchmarks class runs timing tests on our various sorts. Currently, it is configured to perform two timing tests:
Run the code, and you should see results that are in line with things we've learned in class.
Other interesting tests you might try:
Feel free to post interesting tests and/or observations in the HW8 thread.