std::ranges:: nth_element - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/nth_element     2025-02-12T00:00:00.0000000
The element pointed at by nth is changed to whatever element would occur in that position if [first,last) were sorted with respect to comp and proj. All of the elements before this new nth element are less than or equal to the elements after the new nth element. That is, for every iterator i, j in the ranges [first,nth), [nth,last) respectively, the expression std::invoke(comp, std::invoke ...

std:: nth_element - cppreference.com

en.cppreference.com/w/cpp/algorithm/nth_element     2024-10-17T00:00:00.0000000
The element pointed at by nth is changed to whatever element would occur in that position if [first,last) were sorted. For every iterator i in [first,nth) and every iterator j in [nth,last), the following condition is met:

Algorithms library - cppreference.com

en.cppreference.com/w/cpp/algorithm     2024-05-20T00:00:00.0000000
The algorithms library defines functions for a variety of purposes (e.g. searching, sorting, counting, manipulating) that operate on ranges of elements. Note that a range is defined as [first,last) where last refers to the element past the last element to inspect or modify.

Constrained algorithms (since C++20) - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges     2024-11-27T00:00:00.0000000
C++20 provides constrained versions of most algorithms in the namespace std::ranges. In these algorithms, a range can be specified as either an iterator - sentinel pair or as a single range argument, and projections and pointer-to-member callables are supported. Additionally, the return types of most algorithms have been changed to return all potentially useful information computed during the ...

std::ranges:: find, std::ranges:: find_if, std::ranges:: find_if_not

en.cppreference.com/w/cpp/algorithm/ranges/find     2025-02-12T00:00:00.0000000
reverse_copy rotate_copy unique_copy Partitioning operations is_partitioned partition_point partition partition_copy stable_partition Sorting operations is_sorted is_sorted_until sort stable_sort partial_sort nth_element partial_sort_copy Binary search operations (on sorted ranges) lower_bound upper_bound binary_search equal_range Set ...

std::ranges:: generate - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/generate     2025-02-11T00:00:00.0000000
reverse_copy rotate_copy unique_copy Partitioning operations is_partitioned partition_point partition partition_copy stable_partition Sorting operations is_sorted is_sorted_until sort stable_sort partial_sort nth_element partial_sort_copy Binary search operations (on sorted ranges) lower_bound upper_bound binary_search equal_range Set ...

std::ranges::find_last, std::ranges::find_last_if, std::ranges::find ...

en.cppreference.com/w/cpp/algorithm/ranges/find_last     2025-02-13T00:00:00.0000000
reverse_copy rotate_copy unique_copy Partitioning operations is_partitioned partition_point partition partition_copy stable_partition Sorting operations is_sorted is_sorted_until sort stable_sort partial_sort nth_element partial_sort_copy Binary search operations (on sorted ranges) lower_bound upper_bound binary_search equal_range Set ...

std::ranges::partition - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/partition     2025-02-11T00:00:00.0000000
A subrange starting with an iterator to the first element of the second group and finishing with an iterator equal to last. (2) returns std::ranges::dangling if r is an rvalue of non- borrowed_range type.

std::ranges:: generate_n - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/generate_n     2024-04-17T00:00:00.0000000
Assigns the result of successive invocations of the function object gen to each element in the range [first,first + n), if 0< n. Does nothing otherwise. The function-like entities described on this page are algorithm function objects (informally known as niebloids), that is:

std::ranges::search - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/search     2025-02-11T00:00:00.0000000
Return value 1) Returns a ranges::subrange value that is the first occurrence of the sequence [first2,last2) (aka needle) in the range [first1,last1) (aka haystack), after application of the projections proj1 and proj2 to the elements of both sequences respectively with consequencing application of the binary predicate pred to compare projected elements.
Feedback