Courses‎ > ‎AP Computer Science 2‎ > ‎konstantinovich‎ > ‎


posted Mar 23, 2018, 10:14 AM by Konstantinovich Samuel
Improving our nlogn sorts... using n^2 sorts?!?!??

1. Can you write a version of insertion sort that works on a sub-array, similar to merge and quicksort?
insertionsort(data, lo, hi)  

The insertion sort is n^2, but has a low constant.

Improve both your quicksort and your mergesort by using the insertion sort.

I will run your merge + quick again on Monday to catch the improvements and post times.
I will post by OSIS, and have the average completion time, ONLY if all test cases passed.