Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <typename T>
- void selection_sort(std::vector<T>& a) {
- const auto end = a.end();
- for (auto i = a.begin(); i < end; i++) {
- std::iter_swap(i, std::min_element(i, end));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement