Used Algorithms Explain

Algorithm Comparison
Algorithm Time Complexity Space Complexity Best For Worst For
Quick Sort
O(n log n) average
O(n log n) average, O(n²) worst O(log n) Large datasets, general purpose Nearly sorted data
Merge Sort
O(n log n)
O(n log n) O(n) Stable sorting, large datasets Small datasets (due to overhead)
Heap Sort
O(n log n)
O(n log n) O(1) Memory-constrained systems Nearly sorted data
Shell Sort
O(n log² n)
O(n log² n) O(1) Medium-sized datasets Very large datasets
Insertion Sort
O(n²)
O(n²) O(1) Small datasets, nearly sorted data Large datasets
Selection Sort
O(n²)
O(n²) O(1) Small datasets, minimal swaps Large datasets
Bubble Sort
O(n²)
O(n²) O(1) Educational purposes, very small datasets Any practical use
Quick Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps
Merge Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps
Heap Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps
Shell Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps
Insertion Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps
Selection Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps
Bubble Sort Visualization
Statistics
Comparisons: 0
Swaps: 0
Time: 0ms
Steps