A
Albert
What is the time complexity of qsort from the standard library? Please
provide a reference.
provide a reference.
Albert said:What is the time complexity of qsort from the standard library? Please
provide a reference.
Albert said:What is the time complexity of qsort from the standard library?
Please provide a reference.
Debanjan said:It's same as the qsort you learn in data structure books.
Debanjan said:It's same as the qsort you learn in data structure books.
Albert said:What is the time complexity of qsort from the standard library? Please
provide a reference.
What is the time complexity of qsort from the standard library? Please
provide a reference.
What is the time complexity of qsort from the standard library? Please
provide a reference.
Seebs said:Whatever the implementor wants it to be.
Albert said:The time complexity of qsort from the standard library is _not_ the
same as the one I see in material that discusses data structures.
http://en.wikipedia.org/wiki/Sorting_algorithm#Comparison_of_algorithms
Actually, I'm unlikely to need the time complexity of qsort in the
standard library
just for gcc
gcc does not provide qsort, glibc does.
It's same as the qsort you learn in data structure books.
That *cannot* be right. pg 34 of 'The Practice of Programming' says
"the runtime [of "just about the simplest implementation"] can grow
more like n^2".
If qsort is O(n^2),
Albert said:What is the time complexity of qsort from the standard library? Please
provide a reference.
It's same as the qsort you learn in data structure books.
user923005 said:His original question is equivalent to:
How fast is a fast animal?
Please prove your answer.
Not quite. I was hoping for something like:
"I've never seen a compiler provide an O(n^2) qsort", listing a few
references to compiler documentations, so qsort is probably O(nlogn)
>> >
> > It's same as the qsort you learn in data structure books.
> That *cannot* be right. pg 34 of 'The Practice of Programming' says
> "the runtime [of "just about the simplest implementation"] can grow
> more like n^2".
Albert said:Not quite. I was hoping for something like:
"I've never seen a compiler provide an O(n^2) qsort",
... listing a few
references to compiler documentations, so qsort is probably O(nlogn)
Not quite. I was hoping for something like:
"I've never seen a compiler provide an O(n^2) qsort",
listing a few
references to compiler documentations, so qsort is probably O(nlogn)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.