Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've got a collection that I'd like to sort. It is of highest priority that the sorting has to be fast. Memory space is an issue but not as much as sorting speed. Also, I'd like the sorting algorithm to work fairly well for large (infinity) number of objects as for small number of objects.

 

Is there any sorting algorithm that does this. Quicksort is good...but i heard after a certain number of elements, the algorithm slows down rapidly.

Posted
You can also look into the IComparer and IComparable interfaces and how you can use it w/ a call to Array.Sort(). That way, you don't have to devise your own sorting algorithm.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...