## Standard Library Algorithms

 Nonmodifying Sequence Operations for_each() find() find_if() find_first_of() adjacent_find() count() count_if() mismatch() equal() search() find_end() search_n() Do operation for each element in a sequence Find first occurrence of a value in a sequence Find first match of a predicate in a sequence Find a value from one sequence in another Find an adjacent pair of values Count occurrences of a value in a sequence Count matches of a predicate in a sequence Find the first elements for which two sequences differ True if the elements of two sequences are pairwise equal Find the first occurrence of a sequence as a subsequence Find the last occurrence of a sequence as a subsequence Find the nth occurrence of a value in a sequence Modifying Sequence Operations transform() copy() copy_backward() swap() iter_swap() swap_ranges() replace() replace_if() replace_copy() replace_copy_if() fill() fill_n() generate() generate_n() remove() remove_if() remove_copy() remove_copy_if() unique() unique_copy() reverse() reverse_copy() rotate() rotate_copy() random_shuffle() Apply an operation to every element in a sequence Copy a sequence starting with its first element Copy a sequence starting with its last element Swap two elements Swap two elements pointed to by iterators Swap elements of two sequences Replace elements with a given value Replace elements matching a predicate Copy a sequence replacing elements with a given value Copy a sequence replacing elements matching a predicate Replace every element with a given value Replace first n elements with a given value Replace every element with the result of an operation Replace first n elements with the result of an operation Remove elements with a value Remove elements matching a predicate Copy a sequence removing elements with a given value Copy a sequence removing elements matching a predicate Remove equal adjacent elements Copy a sequence removing equal adjacent elements Reverse the order of elements Copy a sequence into reverse order Rotate elements Copy a sequence into a rotated sequence Move elements into a uniform distribution Sorted Sequences sort() stable_sort() partial_sort() partial_sort_copy() nth_element() lower_bound() upper_bound() equal_range() binary_search() merge() inplace_merge() partition() stable_partition() Sort with good average efficiency Sort maintaining order of equal elements Get the first part of sequence into order Copy getting the first part of output into order Put the nth element in its proper place Find the first occurrence of a value Find the last occurrence of a value Find a subsequence with a given value Is a given value in a sorted sequence? Merge two sorted sequences Merge two consecutive sorted subsequences Place elements matching a predicate first Place elements matching a predicate first, preserving relative order Set Algorithms includes() set_union() set_intersection() set_difference() set_symmetric_difference() True if a sequence is a subsequence of another Construct a sorted union Construct a sorted intersection Construct a sorted sequence of elements in the first but not the second sequence Construct a sorted sequence of elements in one but not both sequences Heap Operations make_heap() push_heap() pop_heap() sort_heap() Make sequence ready to be used as a heap Add element to heap Remove element from heap Sort the heap Minimum and Maximum min() max() min_element() max_element() lexicographical_compare() Smaller of two values Larger of two values Smallest value in sequence Largest value in sequence Lexicographically first of two sequences Permutations next_perinutation() prev_permutation() Next permutation in lexicographical order Previous permutation in lexicographical order Predicates   equal_to not_equal_to greater less greater_equal less_equal logical_and logical_or logical_not (unary) arg1 == arg2 arg1 != arg2 arg1 > arg2 arg1 < arg2 arg1 >= arg2 arg1 <= arg2 arg1 && arg2 arg1 || arg2 !arg Arithmetic Operations   plus minus multiplies divides modulus negate (unary) arg1 + arg2 arg1 - arg2 arg1 * arg2 arg1 / arg2 arg1 % arg2 -arg Binders, Adapters, and Negaters   bind2nd(y) bind1st(x) mem_fun() mem_fun_ref() ptr_fun() ptr_fun() not1() not2() Call binary function with y as 2nd argument Call binary function with x as 1st argument Call 0-arg member through pointer Call 0-arg member through reference Call unary pointer to function Call binary pointer to function Negate unary predicate Negate binary predicate
{"ft_lang_label":"__label__en","ft_lang_prob":0.70841175,"math_prob":0.9318894,"size":4527,"snap":"2019-51-2020-05","text_gpt3_token_len":1013,"char_repetition_ratio":0.18461198,"word_repetition_ratio":0.11846154,"special_character_ratio":0.21316545,"punctuation_ratio":0.0093896715,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9763866,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-21T18:19:38Z\",\"WARC-Record-ID\":\"<urn:uuid:61298afe-b36c-4711-9340-8b19baf12851>\",\"Content-Length\":\"7701\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3a2a22c0-a813-44a1-89ad-1e407c3a83de>\",\"WARC-Concurrent-To\":\"<urn:uuid:ec8c885f-10fe-4784-a9be-7739f2e3ba16>\",\"WARC-IP-Address\":\"74.208.236.120\",\"WARC-Target-URI\":\"http://vincehuston.org/cpp/algorithms.html\",\"WARC-Payload-Digest\":\"sha1:K26YKS7VU3DN33LANSMD4NHK42BEEXU7\",\"WARC-Block-Digest\":\"sha1:GMP2MIBWRLN3HFPKMVCNSJPGXPHWRAG3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250604849.31_warc_CC-MAIN-20200121162615-20200121191615-00473.warc.gz\"}"}