ake heap") (C++20)  |  creates a max heap out of a range of elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_make_heap&action=edit)  
[ sort_heap  ](/w/cpp/algorithm/sort_heap "cpp/algorithm/sort heap") |  turns a max heap into a range of elements sorted in ascending order   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_sort_heap&action=edit)  
[ ranges::sort_heap  ](/w/cpp/algorithm/ranges/sort_heap "cpp/algorithm/ranges/sort heap") (C++20)  |  turns a max heap into a range of elements sorted in ascending order   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_sort_heap&action=edit)  
[ is_heap  ](/w/cpp/algorithm/is_heap "cpp/algorithm/is heap") (C++11)  |  checks if the given range is a max heap   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_is_heap&action=edit)  
[ ranges::is_heap  ](/w/cpp/algorithm/ranges/is_heap "cpp/algorithm/ranges/is heap") (C++20)  |  checks if the given range is a max heap   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_is_heap&action=edit)  
[ is_heap_until  ](/w/cpp/algorithm/is_heap_until "cpp/algorithm/is heap until") (C++11)  |  finds the largest subrange that is a max heap   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_is_heap_until&action=edit)  
[ ranges::is_heap_until  ](/w/cpp/algorithm/ranges/is_heap_until "cpp/algorithm/ranges/is heap until") (C++20)  |  finds the largest subrange that is a max heap   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_is_heap_until&action=edit)  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/algorithm&action=edit&section=23
"Edit section: Minimum/maximum operations") ]  Minimum/maximum operations

Defined in header ` [ <algorithm> ](/w/cpp/header/algorithm
"cpp/header/algorithm") `  
---  
[ max  ](/w/cpp/algorithm/max "cpp/algorithm/max") |  returns the greater of the given values   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_max&action=edit)  
[ ranges::max  ](/w/cpp/algorithm/ranges/max "cpp/algorithm/ranges/max") (C++20)  |  returns the greater of the given values   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_max&action=edit)  
[ max_element  ](/w/cpp/algorithm/max_element "cpp/algorithm/max element") |  returns the largest element in a range   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_max_element&action=edit)  
[ ranges::max_element  ](/w/cpp/algorithm/ranges/max_element "cpp/algorithm/ranges/max element") (C++20)  |  returns the largest element in a range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_max_element&action=edit)  
[ min  ](/w/cpp/algorithm/min "cpp/algorithm/min") |  returns the smaller of the given values   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_min&action=edit)  
[ ranges::min  ](/w/cpp/algorithm/ranges/min "cpp/algorithm/ranges/min") (C++20)  |  returns the smaller of the given values   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_min&action=edit)  
[ min_element  ](/w/cpp/algorithm/min_element "cpp/algorithm/min element") |  returns the smallest element in a range   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_min_element&action=edit)  
[ ranges::min_element  ](/w/cpp/algorithm/ranges/min_element "cpp/algorithm/ranges/min element") (C++20)  |