GithubHelp home page GithubHelp logo

pysort's Introduction

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.

pysort's People

Contributors

wasinuddy avatar

Stargazers

Nathan Kittichaikoonkij avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.