Sorting Algorithms
Visualize how different sorting algorithms work step by step
Bubble Sort
Simple comparison sort with adjacent element swapping
Time Complexity: O(n²)
Selection Sort
Find minimum element and swap with front position
Time Complexity: O(n²)
Insertion Sort
Insert elements into sorted portion one by one
Time Complexity: O(n²)
Merge Sort
Divide and conquer algorithm with guaranteed performance
Time Complexity: O(n log n)
Quick Sort
Partition-based sorting with pivot element
Time Complexity: O(n log n)
Heap Sort
Use binary heap to extract elements in sorted order
Time Complexity: O(n log n)
Shell Sort
Gap-based insertion sort with decreasing intervals
Time Complexity: O(n^1.5)
Counting Sort
Integer sorting using counting array
Time Complexity: O(n + k)
Radix Sort
Sort integers digit by digit using stable sorting
Time Complexity: O(d × n)
Bucket Sort
Distribute elements into buckets and sort individually
Time Complexity: O(n + k)
Cocktail Shaker Sort
Bidirectional bubble sort with both directions
Time Complexity: O(n²)
Comb Sort
Bubble sort variant with gap-based comparisons
Time Complexity: O(n²)
Gnome Sort
Simple sort similar to insertion sort
Time Complexity: O(n²)
Odd-Even Sort
Compare odd-even indexed pairs alternately
Time Complexity: O(n²)