[8 / 1 / ?]
Quoted By: >>693779
template<typename Iter>
void sort(Iter first, Iter last)
{
while (first != last)
{
Iter p = last-1;
while (first != p)
{
if (*first > *p)
{
auto tmp = *first;
*first = *p;
*p = tmp;
}
--p;
}
++first;
}
}
void sort(Iter first, Iter last)
{
while (first != last)
{
Iter p = last-1;
while (first != p)
{
if (*first > *p)
{
auto tmp = *first;
*first = *p;
*p = tmp;
}
--p;
}
++first;
}
}