Bölüm 2 · SimülatörSorting Algorithms? ← Bölüm 2 Bubble SortInsertion SortSelection Sort Merge SortQuick SortCounting Sort Radix SortBucket SortHeap SortShell Sort SlowNormalFast New Array Sort CancelReady.Steps: 0valuecompared / movedsorted Kapat TürkçeSorting AlgorithmsPick an algorithm, press Sort and watch 16 random values (10–99) being sorted. Highlighted bars are the elements currently compared or moved; when the run finishes all bars turn green. New Array draws new values, Cancel stops a running sort, and the speed menu sets the delay between steps.Bubble SortCompare adjacent elements and swap them when they are out of order. After each pass, the largest remaining value moves to the end.Insertion SortTake the next element and move it left until it reaches its correct position in the sorted prefix. Efficient for small or nearly sorted inputs.Selection SortFind the smallest remaining element and swap it into the next position of the sorted prefix.Merge SortSplit the list recursively into halves, then merge the sorted halves back together.Quick SortChoose a pivot and partition values around it, then recursively sort the left and right partitions.Counting SortCount occurrences of each value, then reconstruct the sorted output from those counts.Radix SortProcess numbers digit by digit, using a stable counting step for each place value.Bucket SortDistribute values into range-based buckets, sort each bucket and concatenate the results.Heap SortBuild a max heap, then repeatedly move the root to the end and restore the heap.Shell SortApply insertion-sort-like passes using decreasing gaps, finishing with a standard gap of one.Bubble SortKomşu elemanları karşılaştırır ve yanlış sıradaysa yer değiştirir. Her geçişte en büyük kalan değer sona taşınır.Insertion SortSıradaki elemanı alır ve sıralı ön bölümde doğru yerine kadar sola taşır. Küçük veya neredeyse sıralı dizilerde etkilidir.Selection SortKalan bölümdeki en küçük elemanı bulur ve sıralı bölümün sıradaki konumuna taşır.Merge SortListeyi özyinelemeli olarak ikiye böler, sıralı alt listeleri tekrar birleştirir.Quick SortBir pivot seçer ve değerleri pivotun çevresinde böler; sol ve sağ bölümleri özyinelemeli olarak sıralar.Counting SortHer değerin kaç kez geçtiğini sayar ve sayım sonuçlarından sıralı diziyi yeniden oluşturur.Radix SortSayıları basamak basamak işler; her basamak için kararlı bir sayma adımı uygular.Bucket SortDeğerleri aralıklara göre kovalara dağıtır, her kovayı sıralayıp sonuçları birleştirir.Heap SortBir max-heap oluşturur; kökü tekrar tekrar sona taşıyıp heap yapısını yeniden kurar.Shell SortAzalan aralıklarla insertion sort benzeri geçişler yapar; son geçişte aralık bire düşer.ComplexityAlgorithmBestAverageWorstAuxiliary SpaceBubbleO(n)O(n²)O(n²)O(1)InsertionO(n)O(n²)O(n²)O(1)SelectionO(n²)O(n²)O(n²)O(1)MergeO(n log n)O(n log n)O(n log n)O(n)QuickO(n log n)O(n log n)O(n²)O(log n) avg.CountingO(n+k)O(n+k)O(n+k)O(n+k)RadixO(d(n+k))O(d(n+k))O(d(n+k))O(n+k)BucketO(n+k)O(n+k)O(n²)O(n+k)HeapO(n log n)O(n log n)O(n log n)O(1)Shelldepends on gapsdepends on gapsO(n²)O(1)The best case O(n) of bubble sort assumes the early-exit variant that stops after a pass without swaps; the animation runs the plain version.