Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

test123/Sorting-Algorithm-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualizing sorting algorithms, using the matplotlib library.

Algorithms covered so far:

NameFunction Name
Quick Sortquick_sort
Bubble Sortbubble_sort
Selection Sortselection_sort
Insertion Sortinsertion_sort
Heap Sortheap_sort
Merge Sortmerge_sort

Usage:

Install

pip install -r requirements.txt

Run

python main.py function_name

Pass function name as a command line argument from list of functions above(in all lower case and spaces replaced by underscore).

For example:

python main.py quick_sort

How to contribute

If you want to add a new sorting algorithm:

  1. Code the algorithm insorting.py.
  2. Name the function appropriately, likequick_sort,bubble_sort.
  3. While coding the function,do not use python lists. Instead, use anArray object. TheArray class is defined insorting.py. (See already implemented algorithms, for your reference)
  4. TheArray object hasswap,set,get_len,get methods implemented. Feel free to implement any more, additional methods, that you may see fit.
  5. Make sure you add the sorting algorithm to the Readme file!
  6. Make sure your newly implemented algorithm works, by runningtest.py after appending it to the list of algorithms intest.py.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp