← Questions

Sort an array with one misplaced element

0
GleanCodingLast asked Sep 2026

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.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding