Sort an array with one misplaced element

0
Remix

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.

GleanCoding
No answer yet. Write the first one; the best answer gets endorsed.