SORTING / İNTERAKTİF DENEY
Organises the array into a max heap. It moves the largest element to the end, repairs the remaining heap and repeats. Follow the root and child comparisons in the bars.
Sıfırlama, aynı diziyi başlangıç durumuna getirir.
KODUN AKIŞI
MALİYET ANALİZİ
This implementation restores the heap iteratively. If all values are equal, heap repair stops early, giving a best-case running time of O(n). Karmaşıklıklar algoritmaya aittir; görselleştirme geçmişi ek bellek kullanır.