WasinUddy / PySort

Visualizing Sorting algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PySort: Visual Sorting Algorithms in Python

PySort is a Python-based project that visualizes various sorting algorithms using Matplotlib. It provides a clear and interactive way to understand how different sorting algorithms work.

Algorithms Included:

1. Bubble Sort

  • Description: Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The process is repeated for each element in the list.
  • Source Code

2. Selection Sort

  • Description: Selection Sort works by dividing the input list into two parts: a sorted sublist and a sublist of the remaining unsorted items. It repeatedly identifies the smallest (or largest) element from the unsorted segment and swaps it with the first unsorted element.
  • Source Code

3. Insertion Sort

  • Description: Insertion Sort builds a sorted portion of the list one element at a time. For each position, it checks the current element against the previous elements in the sorted portion. If the current element is smaller, it shifts the larger elements to the right until the correct position for the current element is found.
  • Source Code

4. Merge Sort

  • Description: Merge Sort is a divide-and-conquer algorithm that divides the list into two halves, sorts them, and then merges the sorted halves.
  • Source Code

5. Quick Sort

  • Description: Quick Sort is an efficient sorting algorithm that works by selecting a 'pivot' element from the list and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot.
  • Source Code

6. Heap Sort

  • Description: Heap Sort is a comparison-based sorting algorithm that uses a binary heap data structure. It first builds a max heap and then extracts the maximum element repeatedly to get the sorted list.
  • Source Code

Visualization:

The visualization is powered by Matplotlib, providing an interactive way to see how each sorting algorithm processes the data step by step.

License:

This project is licensed under the terms of the MIT License.

About

Visualizing Sorting algorithm

License:MIT License


Languages

Language:Python 100.0%