My question is:
What is the best algorithm for alphabetizing strings of chars in C?
This is a discussion on Alphabetizing n words. within the C Programming forums, part of the General Programming Boards category; My question is: What is the best algorithm for alphabetizing strings of chars in C?...
My question is:
What is the best algorithm for alphabetizing strings of chars in C?
I know bubble sort has O(n^2) and that is really bad, anyone have an extremely fast way of going about this? (sorting LOTS of strings)
See http://en.wikipedia.org/wiki/Quick_sort.
The C standard library has a qsort which can be used in conjunction with strcmp for this.