Sorting algorithms/Insertion sort: Difference between revisions
Content deleted Content added
Go solution |
→{{header|C++}}: Using std::upper_bound keeps this sort stable in the presence of equal keys and may be faster. |
||
Line 221:
=={{header|C++}}==
Uses binary search via std::
<lang cpp>#include <algorithm>
Line 229:
{
for (Iter i = beg; i != end; ++i)
std::rotate(std::
}</lang>
|