Functions in <algorithm>
Non-modifying sequence operations:
all_of Test condition on all elements in range (function template )
any_of Test if any element in range fulfills condition (function template )
none_of Test if no elements fulfill condition (function template )
for_eachApply function to range (function template )
findFind value in range (function template )
find_ifFind element in range (function template )
find_if_not Find element in range (negative condition) (function template )
find_endFind last subsequence in range (function template )
find_first_ofFind element from set in range (function template )
adjacent_findFind equal adjacent elements in range (function template )
countCount appearances of value in range (function template )
count_ifReturn number of elements in range satisfying condition (function template )
mismatchReturn first position where two ranges differ (function template )
equalTest whether the elements in two ranges are equal (function template )
is_permutation Test whether range is permutation of another (function template )
searchSearch range for subsequence (function template )
search_nSearch range for elements (function template )
Modifying sequence operations:
copyCopy range of elements (function template )
copy_n Copy elements (function template )
copy_if Copy certain elements of range (function template )
copy_backwardCopy range of elements backward (function template )
move Move range of elements (function template )
move_backward Move range of elements backward (function template )
swapExchange values of two objects (function template )
swap_rangesExchange values of two ranges (function template )
iter_swapExchange values of objects pointed to by two iterators (function template )
transformTransform range (function template )
replaceReplace value in range (function template )
replace_ifReplace values in range (function template )
replace_copyCopy range replacing value (function template )
replace_copy_ifCopy range replacing value (function template )
fillFill range with value (function template )
fill_nFill sequence with value (function template )
generateGenerate values for range with function (function template )
generate_nGenerate values for sequence with function (function template )
removeRemove value from range (function template )
remove_ifRemove elements from range (function template )
remove_copyCopy range removing value (function template )
remove_copy_ifCopy range removing values (function template )
uniqueRemove consecutive duplicates in range (function template )
unique_copyCopy range removing duplicates (function template )
reverseReverse range (function template )
reverse_copyCopy range reversed (function template )
rotateRotate left the elements in range (function template )
rotate_copyCopy range rotated left (function template )
random_shuffleRandomly rearrange elements in range (function template )
shuffle Randomly rearrange elements in range using generator (function template )
Partitions:
is_partitioned Test whether range is partitioned (function template )
partitionPartition range in two (function template )
stable_partitionPartition range in two - stable ordering (function template )
partition_copy Partition range into two (function template )
partition_point Get partition point (function template )
Sorting:
sortSort elements in range (function template )
stable_sortSort elements preserving order of equivalents (function template )
partial_sortPartially sort elements in range (function template )
partial_sort_copyCopy and partially sort range (function template )
is_sorted Check whether range is sorted (function template )
is_sorted_until Find first unsorted element in range (function template )
nth_elementSort element in range (function template )
Binary search (operating on partitioned/sorted ranges):
lower_boundReturn iterator to lower bound (function template )
upper_boundReturn iterator to upper bound (function template )
equal_rangeGet subrange of equal elements (function template )
binary_searchTest if value exists in sorted sequence (function template )
Merge (operating on sorted ranges):
mergeMerge sorted ranges (function template )
inplace_mergeMerge consecutive sorted ranges (function template )
includesTest whether sorted range includes another sorted range (function template )
set_unionUnion of two sorted ranges (function template )
set_intersectionIntersection of two sorted ranges (function template )
set_differenceDifference of two sorted ranges (function template )
set_symmetric_differenceSymmetric difference of two sorted ranges (function template )
Heap:
push_heapPush element into heap range (function template )
pop_heapPop element from heap range (function template )
make_heapMake heap from range (function template )
sort_heapSort elements of heap (function template )
is_heap Test if range is heap (function template )
is_heap_until Find first element not in heap order (function template )
Min/max:
minReturn the smallest (function template )
maxReturn the largest (function template )
minmax Return smallest and largest elements (function template )
min_elementReturn smallest element in range (function template )
max_elementReturn largest element in range (function template )
minmax_element Return smallest and largest elements in range (function template )
Other:
lexicographical_compareLexicographical less-than comparison (function template )
next_permutationTransform range to next permutation (function template )
prev_permutationTransform range to previous permutation (function template )