powered by
topMaxUsingPartialSortIndices(x, n)
topMaxUsingPartialSortIndices(c(1:10), 3)
Run the code above in your browser using DataLab