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
- Dijkstra's Algorithm:
- Finding the shortest path
📚 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.6.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.6.tar.gz.
File metadata
- Download URL: algotoolkit-0.1.6.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 |
a9e8e46bdd2718345a26796e2fb52de0574e80b76df0475e0e51179f723f71f1
|
|
| MD5 |
45b038f1a1910aead0558d9f7e2f0a2f
|
|
| BLAKE2b-256 |
9072be67088cd421b27902a7ea0f5f12e2e52824c5a798cb5023177781cd149e
|
File details
Details for the file algotoolkit-0.1.6-py3-none-any.whl.
File metadata
- Download URL: algotoolkit-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.8 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 |
106467be1754b1e5602780a761160b5c5c13a7b5d4894205febff4b9133b1d1f
|
|
| MD5 |
609d5d0e48688abd23ef71aef11e6fc9
|
|
| BLAKE2b-256 |
c058e049e817c353837d5d7c1b42140eba8a5b5ca4e128e71631c5b90cac3458
|