This repository is a demo for visualizing Nine kinds of Sorting Algorithms. It aims to make Sort Algorithms easier to understand for programmers. Also, you can see the difference of Time Complexity between different sorting algorithms.
| Sorting Algorithm | Time Complexity |
|---|---|
| Bubble Sort | O(N^2) |
| Insertion Sort | O(N^2) |
| Shell Sort | O(NlogN) |
| Selection Sort | O(N^2) |
| Heap Sort | O(NlogN) |
| Merge Sort | O(NlogN) |
| Quick Sort | O(NlogN) |
| Bucket Sort | O(N) |
| Cycle Sort | O(N^2) |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
- python3.x
- cv2
- numpy
Check all dependencies installed
Clone this repository
git clone [email protected]:ZQPei/Sort_Visualization.gitStart
python main.py -l 512 -t BubbleSort-l--length: Array Length-t--sort-type: Sorting Type. Default type is BubbleSort- BubbleSort
- InsertionSort
- ShellSort
- SelectionSort
- HeapSort
- MergeSort
- QuickSort
- BucketSort
- CycleSort
-i--interval: Time Interval of next frame-r--repetition: Array's Elements is Repeated or Not








