Talk:Sorting algorithm: Difference between revisions

Content deleted Content added
Undid revision 693642907 by Rcgldr (talk) threre was a response
Line 435:
== standard template library stable_sort() is not always in place merge sort ==
 
Standard Template Library includes a stable_sort() function, but does not define how it is implemented. In the case of Microsoft's Visual Studio, stable_sort() uses a temp arrayvectors / vector 1/2(double the sizememory ofspace, thenot arrayan /in-place vectormerge tosort), beuses sorted.insertion Itsort endsto upcreate with the first halfchunks of sorted32 dataelements, inthen themerges tempchunks array/vectoruntil andchunk thesize second half in the second half of the original array /equals vector and then does a final mergesize. The sort algorithms section should not include a reference to Standard Template Libaray as an example of an in place merge sort. A specific implementation of STL's stable_sort() might use an in-place merge sort, but stable_sort() is not defined that way. [[User:Rcgldr|Rcgldr]] ([[User talk:Rcgldr|talk]]) 2202:1706, 39 December 20152011 (UTC)
 
The ISO C++ standard (1998 and now 2011) does give implementation constraints on how stable_sort should be implemented.