Oh yeah, Martin:
The halfsorted is calculated by the formula:
(A random number between 0 and 500) - (a random number between 0 and
450)
Thanks for your replies by the way. They really helped!
--~--~-~--~~~---~--~~
You received this message because you are subscrib
Martin,
Thanks you're a star!
Here's the rest of the data:
For the Selection sort
Time
# of # Random Half-Sorted Sorted
750 1.5 1.5 1.5
10003.1 2.6 3.1
15006.2 5.5 6.2
200011.010.111.0
250015.615.315.7
500062.561.
I calculated times taken to calculate a variety of n values with the
bubble, selection and quick sort. I know that the bubble, selection
are both O(n^2) sorts and that the Quicksort is O(nlogn). But how
could I predict the time taken for these sorts when I know n?
here is my table for the bubble
Well actually, let me recorrect my question:
I calculated times taken to calculate a variety of n values with the
bubble, selection and quick sort. I know that the bubble, selection
are both O(n^2) sorts and that the Quicksort is O(nlogn). But how
could I predict the time taken for these sorts whe
I know how the complexity of an algorithms is calculated, but how
would this relate to the time it takes? Let's say I have 25000 random
numbers I'd like to sort with the selection sort. Now how could I use
Big O notation to calculate the time taken to sort these numbers?? I
mean I understand it's