Skip to main content

A collection of classic algorithms in Python

Project description

Here's the updated README.md content in markdown format:

Algocraft

Algocraft is a Python package that provides efficient and easy-to-use implementations of classic algorithms, including searching, sorting, dynamic programming, graph algorithms, and more. Designed to be a comprehensive library, Algocraft offers a wide range of fundamental algorithms commonly used in computer science, making it a go-to toolkit for both learning and practical applications.

Features

Sorting Algorithms

  • Bubble Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort
  • Strassen's Matrix Multiplication

Search Algorithms

  • Binary Search
  • Linear Search

Dynamic Programming

  • Fibonacci Sequence
  • Knapsack Problem

Graph Algorithms

  • Dijkstra's Algorithm
  • Floyd-Warshall Algorithm

Miscellaneous Algorithms

  • Topological Sort
  • Tower of Hanoi
  • 8-Queens Problem
  • Simplex Method

Installation

You can install the algocraft package via pip from the Python Package Index (PyPI):

pip install algocraft

Usage

Once installed, you can start using the algorithms directly by importing them. For example:

from algocraft import binary_search, fibonacci, merge_sort

# Binary Search
arr = [1, 2, 3, 4, 5]
index = binary_search(arr, 3)
print(f'Index of 3: {index}')  # Output: 2

# Fibonacci
fib_number = fibonacci(10)
print(f'10th Fibonacci number: {fib_number}')  # Output: 34

# Merge Sort
arr_to_sort = [3, 1, 4, 1, 5, 9]
sorted_arr = merge_sort(arr_to_sort)
print(f'Sorted array: {sorted_arr}')  # Output: [1, 1, 3, 4, 5, 9]

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

algocraft-0.2.6.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

algocraft-0.2.6-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file algocraft-0.2.6.tar.gz.

File metadata

  • Download URL: algocraft-0.2.6.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for algocraft-0.2.6.tar.gz
Algorithm Hash digest
SHA256 28dceb7db319532cb9f7b149a75833070c587db53af3cbc0a38923d13784aa57
MD5 20b2d098a82f9b6c32b488a97515acab
BLAKE2b-256 3e2ec3b7bab61e9ac11120a8aa9a1f517dcb34c4d3528a1231ae8ec883e68b9e

See more details on using hashes here.

File details

Details for the file algocraft-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: algocraft-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for algocraft-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f50ed11ab16e2de2b67456ec25322a9c50518c073e3a8d2988eace45d78b4082
MD5 cc5198d4d437b29d12f763f13ad9f2f4
BLAKE2b-256 6cb551617da396779c7768a5823f55b2b78a1fb2ee5aa53ebed520b9d606ceb4

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