Algorithm Library Functions in C++ STL Improve Improve Improve Like Article Like Save Article Save Share Report issue Report Non-modifying sequence operations std :: all_of : Test condition on all elements in rangestd :: any_of : Test if any element in range fulfills conditionstd :: none_of : Test if no elements fulfill conditionstd :: for_each : Apply function to rangestd :: find : Find value in rangestd :: find_if : Find element in rangestd :: find_if_not : Find element in range (negative condition)std :: find_end : Find last subsequence in rangestd :: find_first_of : Find element from set in rangestd :: adjacent_find : Find equal adjacent elements in rangestd :: count : Count appearances of value in rangestd :: count_if : Return number of elements in range satisfying conditionstd :: mismatch : Return first position where two ranges differstd::equal : Test whether the elements in two ranges are equalstd :: is_permutation : Test whether range is permutation of anotherstd :: search : Search range for subsequencestd :: search_n : Search range for elementModifying sequence operations std :: copy : Copy range of elementsstd :: copy_n : Copy elementsstd :: copy_if : Copy certain elements of rangestd :: copy_backward : Copy range of elements backwardstd::move : Move range of elementsstd :: move_backward : Move range of elements backwardstd :: swap : Exchange values of two objectsstd ::swap_ranges : Exchange values of two rangesstd :: iter_swap : Exchange values of objects pointed to by two iteratorsstd ::transform : Transform rangestd ::replace : Replace value in rangestd ::replace_if : Replace values in rangestd :: replace_copy : Copy range replacing valuestd :: replace_copy_if : Copy range replacing valuestd ::fill : Fill range with valuestd :: fill_n : Fill sequence with valuestd ::generate : Generate values for range with functionstd ::generate_n : Generate values for sequence with functionstd ::remove : Remove value from rangestd :: remove_if : Remove elements from rangeremove_copy : Copy range removing valueremove_copy_if : Copy range removing valuesstd ::unique : Remove consecutive duplicates in rangestd :: unique_copy : Copy range removing duplicatesstd ::reverse : Reverse rangestd :: reverse_copy : Copy range reversedstd :: rotate : Rotate left the elements in rangestd :: rotate_copy : Copy range rotated leftstd :: random_shuffle : Randomly rearrange elements in rangestd :: shuffle : Randomly rearrange elements in range using generatorPartition Operations std :: is_partitioned : Test whether range is partitionedstd :: partition : Partition range in twostd :: stable_partition : Partition range in two – stable orderingpartition_copy : Partition range into twopartition_point : Get partition pointSorting std :: sort : Sort elements in rangestd :: stable_sort : Sort elements preserving order of equivalentsstd :: partial_sort : Partially sort elements in rangestd :: partial_sort_copy : Copy and partially sort rangestd :: is_sorted : Check whether range is sortedstd :: is_sorted_until : Find first unsorted element in rangestd :: nth_element : Sort element in rangeBinary search (operating on partitioned/sorted ranges) std :: lower_bound : Return iterator to lower boundstd :: upper_bound : Return iterator to upper boundstd :: equal_range : Get subrange of equal elementsstd :: binary_search : Test if value exists in sorted sequenceMerge (operating on sorted ranges) std :: merge : Merge sorted rangesstd :: inplace_merge : Merge consecutive sorted rangesstd :: includes : Test whether the sorted range includes another sorted rangestd :: set_union : Union of two sorted rangesstd :: set_intersection : Intersection of two sorted rangesstd :: set_difference : Difference of two sorted rangesstd :: set_symmetric_difference : Symmetric difference of two sorted rangesHeap Operations std :: push_heap : Push element into heap rangestd :: pop_heap : Pop element from heap rangestd :: make_heap : Make heap from rangestd :: sort_heap : Sort elements of heapstd :: is_heap : Test if range is heapstd :: is_heap_until : Find first element not in heap orderstd :: max : Return the largeststd :: minmax : Return smallest and largest elementsstd :: min_element : Return smallest element in rangestd :: max_element : Return largest element in rangestd :: minmax_element : Return smallest and largest elements in rangeOther Operations std :: lexicographical_compare : Lexicographical less-than comparisonstd :: next_permutation : Transform range to next permutationstd :: prev_permutation : Transform range to previous permutation All STL articles of C++ Last Updated : 21 Aug, 2023 Like Article Save Article Previous for_each loop in C++ Next Functors in C++ Share your thoughts in the comments Add Your Comment Please Login to comment...