I am now revising the sorting algorithms. Here is the question:
It is given that this sorting algorithm is written in C, and treats 'a' and 'A' as equal, and after running this sorting algorithm, the results are as follows:
10000 random data -> 0.016 sec
100000 random data -> 0.304 sec
10000 ordered data -> 0.006 sec
100000 ordered data -> 0.108 sec
10000 reversed data -> 0.010 sec
100000 reversed data -> 0.138 sec
Question: In point form briefly state the conclusions that you can draw from the test results above.
What I have done
I know this sorting algorithm is non-stable (as stated in the question), and I can guess it is a quick sort.
I know that quick sort has worst case O(n^2), average and best case O(n log n), but I have got no idea how to explain from the results, I can't just say oh its because its non-stable and quick sort have bad results in reversed order, so i can determine it's quick sort.
Are there anything specific I can tell from the result? It would be nice if there are maths calculations or some other important observations from the results.