Stores the smallest elements of the two ranges in the left-hand range.
The predicate to sort by.
The swapping strategy to use.
The first range.
The second range.
int[] a = [ 5, 7, 2, 6, 7 ]; int[] b = [ 2, 1, 5, 6, 7, 3, 0 ]; topN(a, b); sort(a); assert(a == [0, 1, 2, 2, 3]);
See Implementation
Stores the smallest elements of the two ranges in the left-hand range.