Sort an array with one misplaced element
Sort a nearly sorted array in which a single element sits out of place, faster than a full sort. Reported on 1point3acres' Glean bank; reconstructed in our own words.
No answer yet. Write the first one; the best answer gets endorsed.
