Skip to content

alok1304/AlgoToolkit

Repository files navigation

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 using pip after building it or directly from source:

git clone https://github.com/alok1304/AlgoToolkit.git
cd AlgoToolkit
pip install .

πŸš€ Usage

from AlgoToolkit.algo import bubble_sort, binary_search

# Sorting Example
arr = [5, 2, 9, 1]
sorted_arr = bubble_sort(arr)
print("Sorted Array:", sorted_arr)

# Searching Example
target = 2
index = binary_search(sorted_arr, target)
print(f"Element found at index {index}")

# Example using shell
>>> from AlgoToolkit import algo
>>> algo.bubble_sort([3,7,1,2,5])
[1, 2, 3, 5, 7]
>>> algo.binary_search([1,3,5,7,9],7)
3

πŸ§ͺ Running Tests

Ensure you have pytest installed:

pip install pytest
pytest tests/

πŸ“¦ Project Structure

AlgoToolkit/
β”œβ”€β”€ AlgoToolkit/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── algo.py
β”œβ”€β”€ tests/
β”‚   └── test_algo.py
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ requirements.txt

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please submit a pull request with your changes.

🌟 Author

Developed by Alok Kumar.

About

A Python package for sorting and searching algorithms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages