Skip to main content

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 = algo.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-2.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

algotoolkit-2.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file algotoolkit-2.0.1.tar.gz.

File metadata

  • Download URL: algotoolkit-2.0.1.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

Hashes for algotoolkit-2.0.1.tar.gz
Algorithm Hash digest
SHA256 b6c9fc9c53df7699df0532301aa6c495b58748c801bc83bfde00ea51ea6226ae
MD5 3ded58e1f2ae9a14d8dccdd8c93e326d
BLAKE2b-256 11dbd483f2c6ae1eaf6f01638f2f9500d641300b2217c272738ab520755da26c

See more details on using hashes here.

File details

Details for the file algotoolkit-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: algotoolkit-2.0.1-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

Hashes for algotoolkit-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18832e996b560dcde5705dde8167153054f277eae471cc405e32d5f93f13717d
MD5 9c6494af966b653d444a2a335f1848f6
BLAKE2b-256 0c798ec1a62bdda908419a36c27a80973feabab6a295f0dde00cdaf0b330e85a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page