This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What sorting algorithm is used by std::list<>?


On August 12, 2003 04:09 am, Dhruv Matani wrote:
> What algorithm for sorting is used by std::list<> It seems to be a
> hybrib of merge sort and something else that I can't figure out. And
> help would be appreciated. Do you have any documentation on this?

The standard requires the list sort function to be a stable sort of NlogN 
complexity.  Your best bet for documentation is Knuth.

-- 
Stephen M. Webb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]