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.0.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.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: algotoolkit-2.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9b801db01d3b76e67f0a2d05bdf42cf3e5f451ce7f58b2be2625ad5269e0949a
MD5 64deefe280beb5d50080541fa49b9038
BLAKE2b-256 d2ef9f4cab479f3f72950112d184cd2630c1a45b181084d70c7fc36b62ac4083

See more details on using hashes here.

File details

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

File metadata

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

Hashes for algotoolkit-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc014770eb774d5ee766d75e93709cb8178a7f4bc9e2b2507d6dfcfe22e3bf31
MD5 e1ab64d7a522e06b44c7785e1bbb8713
BLAKE2b-256 6a341332302ea87a43cd9b6c9723c4a6d00be7836c2fa4ef108251c295f59358

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