A Python package for sorting and searching algorithms.
Project description
AlgoToolkit
A Python package for sorting and searching algorithms.
📦 Features
- Sorting Algorithms:
- Bubble Sort
- Merge Sort
- Selection Sort
- Quick Sort
- Insertion Sort
- Searching Algorithms:
- Binary Search
- Linear Search
📚 Installation
You can install the package directly from PyPI:
pip install algotoolkit
🚀 Usage
from AlgoToolkit import algo
# Test the bubble sort function
arr = [5, 2, 9, 1, 5, 6]
sorted_arr = algo.bubble_sort(arr)
print(f"Sorted array using Bubble Sort: {sorted_arr}")
# Test the binary search function
sorted_arr = [1, 2, 5, 5, 6, 9]
target = 5
index = algo.binary_search(sorted_arr, target)
print(f"Index of {target} using Binary Search: {index}")
# Test the shortest path using Dijkstra Algorithm
graph = {
'A': {'B': 4, 'C': 2},
'B': {'A': 4, 'C': 5, 'D': 10},
'C': {'A': 2, 'B': 5, 'D': 3},
'D': {'B': 10, 'C': 3}
}
distances, previous = dijkstra(graph, 'A')
print(distances)
print(previous)
Expected Output:
- For Bubble Sort:
Sorted array using Bubble Sort: [1, 2, 5, 5, 6, 9]
- For Binary Search:
Index of 5 using Binary Search: 2
- For Shortest Path:
{'A': 0, 'B': 4, 'C': 2, 'D': 5}
{'A': None, 'B': 'A', 'C': 'A', 'D': 'C'}
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
algotoolkit-0.1.5.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algotoolkit-0.1.5.tar.gz.
File metadata
- Download URL: algotoolkit-0.1.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41481860709c19bc96bcd8bf4f0345814153da77bddad18ef2d7e940edc2c31
|
|
| MD5 |
3a931a9e014446c56e4690466b5d6747
|
|
| BLAKE2b-256 |
a721441123b38aec76eaf34ea83e0b7803258b1b38cb0de452f6a486ecb5a6ef
|
File details
Details for the file algotoolkit-0.1.5-py3-none-any.whl.
File metadata
- Download URL: algotoolkit-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
535a35f87f0ebb826e4d5d7e1d643fae071678f322fc419ea71f4f069ba5c4bf
|
|
| MD5 |
10f0df485d7ec30d2932c478adfbfe36
|
|
| BLAKE2b-256 |
3c2dbf8a473a3d972ca0f5b840c9df0550da84ebd852e3f20a80233641cf8c32
|