Welcome to Sorting Algorithm Visualizer! I am always fascinated by sorting algorithms, how they work, and I wanted to visualize them in action. Hope that you shall enjoy playing around with this visualization tool just as much as I enjoyed building it.
App: https://mohammad1745.github.io/sorting_algorithm_visualizer (Chrome Recommended)
This application supports the following algorithms:
Merge Sort Algorithm : The time complexity of Merge Sort is O(n*Log n) in all the 3 cases (worst, average and best). As the mergesort always divides the array into two halves and takes linear time to merge two halves. The space complexity of Merge sort is O(n).The space complexity of Merge sort is O(n).
Learn more...
Quick Sort Algorithm : The time complexity of Quick Sort is O(n^2) in worst case and O(n*Log n) in average and best cases. The in-place version of quicksort has a space complexity of O(log n), even in the worst case. This unstable partition requires O(1) space.
Learn more...
Bubble Sort Algorithm : The time complexity of Bubble Sort is O(n^2) in worst and average cases and O(n) in best case. It has the space complexity of O(1).
Learn more...
Selection Sort Algorithm : The time complexity of Selection Sort is O(n^2) in worst and average cases and O(n^2) in best case. It has the space complexity of O(1).
Learn more...
Insertion Sort Algorithm : The time complexity of Insertion Sort is O(n^2) in all the 3 cases (worst, average and best). It has the space complexity of O(1).
Learn more...
Heap Sort Algorithm : The time complexity of Heap Sort is O(n*Log n) in all the 3 cases (worst, average and best). It has the space complexity of O(1).
Learn more...
Heap Sort has a Binary Tree Representation also for array size less than 32
Beside the auto generated array, user can input a custom array to sort.