Sorting algorithms/Insertion sort: Difference between revisions

m
(Thought it might help to include a substantially more efficient version.)
Line 1,682:
key <- x[j]
bp <- which.max(x[1:j] > key)
# 'bp' stands for breakpoint
if (bp == 1) {
if (key < ar[1]){
Anonymous user