C++std::pop_heap moves the root of a nonempty heap to the end of the range and restores the heap in the remaining prefix. It does not erase a container element. For std::vector, pop_back() removes the extracted element only if the heap range ends at the end of the vector.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::prev from <iterator> returns a shifted copy of a bidirectional iterator without changing the argument. It moves backward by one step by default; negative n means moving forward. The caller must ensure that the movement stays within valid bounds and that evaluating -n does not overflow.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::prev_permutation rearranges a range into its previous lexicographical permutation. It returns bool; when no previous permutation exists, it rearranges the range into the last permutation and returns false.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::print from <print> writes formatted data to stdout or a specified FILE* stream. It uses replacement fields such as {} and does not automatically append a newline.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::println from <print> formats arguments, writes the result, and appends a newline. It uses stdout by default; an overload accepting FILE* lets you select another output stream.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::priority_queue exposes the highest-priority element rather than the earliest inserted one. By default, the largest value is on top; std::greater<T> reverses the ordering.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::promise<T> stores a single result in shared state read through std::future<T>. The result can be a value or an exception; the promise object itself does not start a computation or thread.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::push_heap restores the heap property after one element has been appended to a range. It does not grow the container: the new element must already be at last - 1, and the preceding part of the range must already be a valid heap.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::queue is a container adaptor implementing FIFO order: the first element inserted is the first removed. It supports insertion at the back, access to both ends, and removal from the front, without a public iterator interface.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::ranges::copy copies elements in input order to a destination specified by an output iterator. It accepts either a whole range or an iterator and sentinel, and returns the final input and output positions.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::equal_range finds the half-open range of elements equivalent to a search value under a comparator. It supports ranges, iterator–sentinel pairs, and projections; it requires appropriately partitioned data, which sorting guarantees.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++`std::ranges::find` locates the first element equal to a supplied value, optionally after projection. The result is not a `bool`: an iterator points to the first match or marks the end if there is no match. The range overload instead returns `std::ranges::dangling` when passed an rvalue range that does not satisfy `borrowed_range`.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::greater is a function object from <functional> that compares two arguments in the reverse order of std::ranges::less. It requires compatible comparison operations described by std::totally_ordered_with.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::input_range describes a range whose iterator supports reading elements and advancing to subsequent positions. It does not guarantee multiple passes: reading may consume data, as with a stream view.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::is_sorted returns a bool indicating whether a range is ordered according to a comparator and projection. It does not sort the data; by default, it checks nondecreasing order and allows duplicates.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::less is a function object type from <functional> that compares two arguments. It supports compatible different types, requires std::totally_ordered_with, and returns bool.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::sort from <algorithm> sorts elements within an existing range. It accepts a whole range or an iterator and sentinel, plus an optional comparator and key projection.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::subrange from <ranges> combines a starting iterator and an ending sentinel into a view of [first, last). It does not copy elements into a new container; it lets you pass a selected portion of data as one object.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++C++23 std::ranges::to constructs an object, usually a container, from an input range. It lets you finish a view pipeline with a concrete result, specifying either the full container type or a template whose arguments will be deduced.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::transform computes values from one range or corresponding elements of two ranges and writes them through an output iterator. It is an eager algorithm, not a lazy view.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::view_interface is a CRTP base for custom views. It supplies convenience members from range operations, but their availability depends on the capabilities of the iterator and sentinel.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::recursive_mutex lets the same thread acquire the same mutex repeatedly. Other threads can acquire it only after every ownership level has been released. Each successful acquisition requires a separate unlock.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::reduce from <numeric> combines a range and an initial value into one result. It may reorder and regroup operations, so it is not a substitute for std::accumulate when evaluation order matters.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::reference_wrapper stores a reference without owning its target. Learn std::ref, std::cref, and the difference between modifying the referenced object and changing which object the wrapper references.
Intermediate · C++23; repository compiler flag, production runtime not attested