#####  [ cppreference.com ](/)

[ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Falgorithm
"You are encouraged to log in; however, it is not mandatory \[o\]")

#####  Namespaces

  * [ Page ](/w/cpp/algorithm "View the content page \[c\]")
  * [ Discussion ](/w/Talk:cpp/algorithm "Discussion about the content page \[t\]")

#####  Variants

#####  Views

  * [ View ](/w/cpp/algorithm)
  * [ Edit ](/mwiki/index.php?title=cpp/algorithm&action=edit "You can edit this page. Please use the preview button before saving \[e\]")
  * [ History ](/mwiki/index.php?title=cpp/algorithm&action=history "Past revisions of this page \[h\]")

#####  Actions

#  Algorithms library

From cppreference.com

< [ cpp ](/w/cpp "cpp")

[ C++ ](/w/cpp "cpp")

[ Compiler support ](/w/cpp/compiler_support "cpp/compiler support")  
---  
[ Freestanding and hosted ](/w/cpp/freestanding "cpp/freestanding")  
[ Language ](/w/cpp/language "cpp/language")  
[ Standard library ](/w/cpp/standard_library "cpp/standard library")  
[ Standard library headers ](/w/cpp/header "cpp/header")  
[ Named requirements ](/w/cpp/named_req "cpp/named req")  
[ Feature test macros ](/w/cpp/feature_test "cpp/feature test") (C++20)  
[ Language support library ](/w/cpp/utility#Language_support "cpp/utility")  
[ Concepts library ](/w/cpp/concepts "cpp/concepts") (C++20)  
[ Metaprogramming library ](/w/cpp/meta "cpp/meta") (C++11)  
[ Diagnostics library ](/w/cpp/error "cpp/error")  
[ General utilities library ](/w/cpp/utility "cpp/utility")  
[ Strings library ](/w/cpp/string "cpp/string")  
[ Containers library ](/w/cpp/container "cpp/container")  
[ Iterators library ](/w/cpp/iterator "cpp/iterator")  
[ Ranges library ](/w/cpp/ranges "cpp/ranges") (C++20)  
**Algorithms library**  
[ Numerics library ](/w/cpp/numeric "cpp/numeric")  
[ Localizations library ](/w/cpp/locale "cpp/locale")  
[ Input/output library ](/w/cpp/io "cpp/io")  
[ Filesystem library ](/w/cpp/filesystem "cpp/filesystem") (C++17)  
[ Regular expressions library ](/w/cpp/regex "cpp/regex") (C++11)  
[ Concurrency support library ](/w/cpp/thread "cpp/thread") (C++11)  
[ Technical specifications ](/w/cpp/experimental "cpp/experimental")  
[ Symbols index ](/w/cpp/symbol_index "cpp/symbol index")  
[ External libraries ](/w/cpp/links/libs "cpp/links/libs")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/navbar_content&action=edit)

**Algorithm library**

[ Constrained algorithms and algorithms on ranges ](/w/cpp/algorithm/ranges
"cpp/algorithm/ranges") (C++20)  
---  
Constrained algorithms, e.g. [ ` ranges::copy ` ](/w/cpp/algorithm/ranges/copy
"cpp/algorithm/ranges/copy") , [ ` ranges::sort `
](/w/cpp/algorithm/ranges/sort "cpp/algorithm/ranges/sort") , ...  
[ Execution policies  (C++17)  ](/w/cpp/algorithm#Execution_policies
"cpp/algorithm")  
|  |  [ is_execution_policy  ](/w/cpp/algorithm/is_execution_policy "cpp/algorithm/is execution policy") (C++17)   
---  
  
|  [ execution::seq  execution::par  execution::par_unseq  execution::unseq
](/w/cpp/algorithm/execution_policy_tag "cpp/algorithm/execution policy tag")
(C++17)  (C++17)  (C++17)  (C++20)  
---  
  
|  |  [ execution::sequenced_policy  execution::parallel_policy  execution::parallel_unsequenced_policy  execution::parallel_unsequenced  ](/w/cpp/algorithm/execution_policy_tag_t "cpp/algorithm/execution policy tag t") (C++17)  (C++17)  (C++17)  (C++20)   
---  
  
|  [ Non-modifying sequence operations ](/w/cpp/algorithm#Non-
modifying_sequence_operations "cpp/algorithm")  
---  
[ Batch operations ](/w/cpp/algorithm#Batch_operations "cpp/algorithm")  
|  [ for_each  ](/w/cpp/algorithm/for_each "cpp/algorithm/for each")  
---  
  
|  [ for_each_n  ](/w/cpp/algorithm/for_each_n "cpp/algorithm/for each n")
(C++17)  
---  
  
[ Search operations ](/w/cpp/algorithm#Search_operations "cpp/algorithm")  
|  [ all_of  any_of  none_of  ](/w/cpp/algorithm/all_any_none_of
"cpp/algorithm/all any none of") (C