Stooge Sort Visualization


Stooge Sort - Sorting Algorithm Visualizer

DESCRIPTION

Stooge Sort is an inefficient recursive sorting algorithm that follows a divide-and-conquer approach. It is primarily of theoretical interest due to its poor performance compared to more efficient sorting methods.

The algorithm works by recursively sorting the first two-thirds of the array, then the last two-thirds, and then the first two-thirds again. If the first element is greater than the last element, they are swapped before proceeding with recursion.

Stooge Sort has a worst-case time complexity of O(n2.7095), which makes it significantly slower than other comparison-based sorting algorithms like Merge Sort or Quick Sort.

One key drawback of Stooge Sort is its high computational cost, as it performs multiple redundant recursive calls. Despite this, it is useful for educational purposes, helping students understand recursion and divide-and-conquer principles.

Due to its inefficiency, Stooge Sort is not used in real-world applications. However, it remains an interesting algorithm in computer science discussions and theoretical studies of sorting techniques.

COMPLEXITY

Average Complexity O(n2.7095)
Best Case O(n) (if the array is already sorted)
Worst Case O(n2.7095)
Space Complexity O(1) (in-place sorting)
Stooge Sort Visualization

Stooge SORT IMPLEMENTATION

                    
                
Stooge Sort Visualization