Nth Element
Nth Element Nth Element rearranges an array so that the element at index $k$ is exactly the element that would appear at that position in a fully sorted array. All elements before index $k$ are less than or equal to it, and all elements after are greater than or equal to it. The order within those partitions is not sorted. This is a partition based selection primitive widely used in...