returns the smallest element in a range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_min_element&action=edit)  
[ minmax  ](/w/cpp/algorithm/minmax "cpp/algorithm/minmax") (C++11)  |  returns the smaller and larger of two elements   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_minmax&action=edit)  
[ ranges::minmax  ](/w/cpp/algorithm/ranges/minmax "cpp/algorithm/ranges/minmax") (C++20)  |  returns the smaller and larger of two elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_minmax&action=edit)  
[ minmax_element  ](/w/cpp/algorithm/minmax_element "cpp/algorithm/minmax element") (C++11)  |  returns the smallest and the largest elements in a range   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_minmax_element&action=edit)  
[ ranges::minmax_element  ](/w/cpp/algorithm/ranges/minmax_element "cpp/algorithm/ranges/minmax element") (C++20)  |  returns the smallest and the largest elements in a range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_minmax_element&action=edit)  
[ clamp  ](/w/cpp/algorithm/clamp "cpp/algorithm/clamp") (C++17)  |  clamps a value between a pair of boundary values   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_clamp&action=edit)  
[ ranges::clamp  ](/w/cpp/algorithm/ranges/clamp "cpp/algorithm/ranges/clamp") (C++20)  |  clamps a value between a pair of boundary values   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_clamp&action=edit)  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/algorithm&action=edit&section=24
"Edit section: Lexicographical comparison operations") ]  Lexicographical
comparison operations

Defined in header ` [ <algorithm> ](/w/cpp/header/algorithm
"cpp/header/algorithm") `  
---  
[ lexicographical_compare  ](/w/cpp/algorithm/lexicographical_compare "cpp/algorithm/lexicographical compare") |  returns  true  if one range is lexicographically less than another   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_lexicographical_compare&action=edit)  
[ ranges::lexicographical_compare  ](/w/cpp/algorithm/ranges/lexicographical_compare "cpp/algorithm/ranges/lexicographical compare") (C++20)  |  returns  true  if one range is lexicographically less than another   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_lexicographical_compare&action=edit)  
[ lexicographical_compare_three_way  ](/w/cpp/algorithm/lexicographical_compare_three_way "cpp/algorithm/lexicographical compare three way") (C++20)  |  compares two ranges using three-way comparison   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_lexicographical_compare_three_way&action=edit)  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/algorithm&action=edit&section=25
"Edit section: Permutation operations") ]  Permutation operations

Defined in header ` [ <algorithm> ](/w/cpp/header/algorithm
"cpp/header/algorithm") `  
---  
[ next_permutation  ](/w/cpp/algorithm/next_permutation "cpp/algorithm/next permutation") |  generates the next greater lexicographic permutation of a range of elements   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_next_permutation&action=edit)  
[ ranges::next_permutation  ](/w/cpp/algorithm/ranges/next_permutation "cpp/algorithm/ranges/next permutation") (C++20)  |  generates the next greater lexicographic permutation of a range of elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template: