Gnome Sort
Gnome Sort Gnome sort is a simple comparison-based sorting algorithm. It scans forward through the array, and when it finds two adjacent elements out of order, it swaps them and steps backward. When elements are in order, it moves forward. The behavior resembles insertion sort, but instead of shifting elements, it repeatedly swaps while moving backward. Problem Given a sequence $A$ of length $n$, reorder it such that $$ A[0]...