algorithm/ranges/partition copy") (C++20)  |  copies a range dividing the elements into two groups   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_partition_copy&action=edit)  
[ stable_partition  ](/w/cpp/algorithm/stable_partition "cpp/algorithm/stable partition") |  divides elements into two groups while preserving their relative order   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_stable_partition&action=edit)  
[ ranges::stable_partition  ](/w/cpp/algorithm/ranges/stable_partition "cpp/algorithm/ranges/stable partition") (C++20)  |  divides elements into two groups while preserving their relative order   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_stable_partition&action=edit)  
[ partition_point  ](/w/cpp/algorithm/partition_point "cpp/algorithm/partition point") (C++11)  |  locates the partition point of a partitioned range   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_partition_point&action=edit)  
[ ranges::partition_point  ](/w/cpp/algorithm/ranges/partition_point "cpp/algorithm/ranges/partition point") (C++20)  |  locates the partition point of a partitioned range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_partition_point&action=edit)  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/algorithm&action=edit&section=18
"Edit section: Sorting operations") ]  Sorting operations

Defined in header ` [ <algorithm> ](/w/cpp/header/algorithm
"cpp/header/algorithm") `  
---  
[ sort  ](/w/cpp/algorithm/sort "cpp/algorithm/sort") |  sorts a range into ascending order   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_sort&action=edit)  
[ ranges::sort  ](/w/cpp/algorithm/ranges/sort "cpp/algorithm/ranges/sort") (C++20)  |  sorts a range into ascending order   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_sort&action=edit)  
[ stable_sort  ](/w/cpp/algorithm/stable_sort "cpp/algorithm/stable sort") |  sorts a range of elements while preserving order between equal elements   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_stable_sort&action=edit)  
[ ranges::stable_sort  ](/w/cpp/algorithm/ranges/stable_sort "cpp/algorithm/ranges/stable sort") (C++20)  |  sorts a range of elements while preserving order between equal elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_stable_sort&action=edit)  
[ partial_sort  ](/w/cpp/algorithm/partial_sort "cpp/algorithm/partial sort") |  sorts the first N elements of a range   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_partial_sort&action=edit)  
[ ranges::partial_sort  ](/w/cpp/algorithm/ranges/partial_sort "cpp/algorithm/ranges/partial sort") (C++20)  |  sorts the first N elements of a range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_partial_sort&action=edit)  
[ partial_sort_copy  ](/w/cpp/algorithm/partial_sort_copy "cpp/algorithm/partial sort copy") |  copies and partially sorts a range of elements   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_partial_sort_copy&action=edit)  
[ ranges::partial_sort_copy  ](/w/cpp/algorithm/ranges/partial_sort_copy "cpp/algorithm/ranges/partial sort copy") (C++20)  |  copies and partially sorts a range of elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_partial_sort_copy&action=edit)  
[ is_sorted  ](/w/cpp/algorithm/is_sorted