Page 2 of 2 [ 18 posts ]  Go to page Previous  1, 2

soulecho
Blue Jay
Blue Jay

User avatar

Joined: 27 Jul 2010
Age: 49
Gender: Female
Posts: 78
Location: Niagara Falls

15 Jun 2011, 7:55 pm

mcg wrote:
soulecho wrote:

Wrong, the most efficient search/sort mechanism is a hash/key pair, which is O(1). Heapsort is O(nLog(n))

:wink:
You can't sort in constant time. You can use a hash table for constant time lookup (assuming there are no collisions), but hashes are not useful for sorting.

Edit: well there are bucket-type sorts but those are linear time at best and need big data structures.


*sigh*

Yes, you are correct. But in my defense, I was thinking purely about the search aspect when I posted my response. :oops:



cdfox7
Veteran
Veteran

User avatar

Joined: 31 Mar 2011
Age: 46
Gender: Male
Posts: 1,700

17 Jun 2011, 4:09 am

Ok this is not online as such plus its stopped being update.
When I did my computer science degree there was a set of cd of resources (its move over to dvd now) called BURKS Brighton University Resource Kit for Students.
http://burks.brighton.ac.uk/

off the top of my head BURKS has a good number of docs about algorithms plus other programming resources