algorithm | Description |
accumulate(start, stop, value); |
Return the sum of the values in the sequence plus
value |
find(start, stop, value); |
Return an iterator to value in the sequence,
or stop if it is not present |
count(start, stop, value); |
Return the number of times value occurs in the sequence |
fill(start, stop, value); |
Assign value to every element of the sequence |
iota(start, stop, value); |
Fill the sequence with monotonically ascending values,
beginning with value |
replace(start, stop, old, new); |
Replace each occurrence of old
in the sequence with new |
for_each(start, stop, F); |
Apply function F to each value in the sequence |
max_element(start, stop); |
Return an iterator to the maximum value in the sequence |
min_element(start, stop); |
Return an iterator to the minimum value in the sequence |
reverse(start, stop); |
Reverse the order of the values in the sequence |
random_shuffle(start, stop); |
Shuffle the values in the sequence randomly |
sort(start, stop); |
Arrange the sequence's values in ascending order |
binary_search(start, stop, value); |
Return true if value is in the sorted sequence,
or false if it is not present |
lower_bound(start, stop, value); |
Return an iterator to the first position at which
value can be inserted,
such that the sequence remains sorted. |
upper_bound(start, stop, value); |
Return an iterator to the last position at which
value can be inserted,
such that the sequence remains sorted. |
unique(start, stop); |
In the sequence, replace any consecutive occurrences of
the same value with one instance of that value |
next_permutation(start, stop); |
Shuffle the sequence to its next permutation and return true
(If there is none, return false) |
prev_permutation(start, stop); |
Shuffle the sequence to its previous permutation and return true
(If there is none, return false) |