An algorithm visualization pip package for Python
Project description
Getting Started
Installation
Stable release
To install artific, run this command in your terminal
pip install artific
This is the preferred method to install artific, as it will always install the most recent stable release.
If you don't have pip installed, this Python installation guide can guide
you through the process.
Algorithms
Sorting
Bubblesort
from artific import BubbleSort
arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
arr = BubbleSort(arr)
arr.visualize()
print(arr)
Output
[0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]
The code above will generate the following GIF
Insertionsort
from artific import InsertionSort
arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
arr = InsertionSort(arr)
arr.visualize()
print(arr)
Output
[0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]
The code above will generate the following GIF
Heapsort
from artific import HeapSort
arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
arr = HeapSort(arr)
arr.visualize()
print(arr)
Output
[0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]
The code above will generate the following GIF
Searching
Linear search
from artific import LinearSearch
arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
obj = LinearSearch(arr,1)
obj.visualize()
print(obj)
Output
3
The code above will generate the following GIF
Linear search
from artific import BinarySearch
arr = [0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]
obj = LinearSearch(arr,55)
obj.visualize()
print(obj)
Output
9
The code above will generate the following GIF
TODO
- Searching
- Graph Algorithms
- Trees
Acknowledgments
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for artific-0.0.13-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca5543f5d79c82cc2a8c6cab727b15276d4b9844c2863a14ed63ba6984dbd028 |
|
MD5 | a38445306df43e2660f3e26068023ccf |
|
BLAKE2b-256 | dda84d613ad32bfa9ea68ac75d65173c93bf273d92efa2c7d1a3661389aa0a3e |