Weitere Beispiele werden automatisch zu den Stichwörtern zugeordnet - wir garantieren ihre Korrektheit nicht.
Here is pseudocode for the gnome sort using a zero-based array:
The gnome sort may be optimized by introducing a variable to store the position before traversing back toward the beginning of the list.
With this optimization, the gnome sort would become a variant of the insertion sort.
Among simple average-case Θ(n) algorithms, selection sort almost always outperforms bubble sort and gnome sort.