[#absl-c_nth_element-07]
= xref:absl.adoc[absl]::c&lowbar;nth&lowbar;element
:relfileprefix: ../
:mrdocs:

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;nth&lowbar;element()` function to rearrange the elements within a container such that the `nth` element would be in that position in an ordered sequence&semi; other elements may be in any order, except that all preceding `nth` will be less than that element, and all following `nth` will be greater than that element&period;

== Synopsis

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename RandomAccessContainer&gt;
constexpr
void
c&lowbar;nth&lowbar;element(
    RandomAccessContainer& sequence,
    &sol;&ast; implementation-defined &ast;&sol; nth);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sequence*
| The container to rearrange&period;
| *nth*
| An iterator to the element to place in its sorted position&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
