SORTING / İNTERAKTİF DENEY
Places each new element in its correct position in the sorted section on the left. This demonstration uses adjacent swaps; it works well for small and nearly sorted arrays.
Sıfırlama, aynı diziyi başlangıç durumuna getirir.
KODUN AKIŞI
MALİYET ANALİZİ
This version moves the selected element to the left using adjacent swaps. A sorted array requires only n − 1 comparisons. Karmaşıklıklar algoritmaya aittir; görselleştirme geçmişi ek bellek kullanır.