Skip to content

mis1205/Sorting_Visualization

Repository files navigation

Sorting Visualization

Introduction

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)

Dependencies

  • python3.x
  • cv2
  • numpy

Quick Start

  1. Check all dependencies installed

  2. Clone this repository

    git clone [email protected]:ZQPei/Sort_Visualization.git

  3. Start

    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

May you have fun!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages