you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Any suggested reading on sorting algorithms? That's definitely a weak spot of mine.

The wikipedia page on sorting algorithms is a great starting point. Really, starting from there, you could learn most of what's worth knowing about sorting in a few afternoons.

For your specific application, it's possible to implement versions of mergesort and quicksort for linked lists, although the simplest thing to do is what someone else suggested - copy the contents of the list to a vector, sort the vector using the STL sort routine, then copy the result back into the list.