Skip to main content

A minimal Python algorithms library with clean implementations of search algorithms and sort algorithms

Project description

algokit-py

A lightweight Python algorithms library with clean, well-documented, and tested implementations. Designed for learning, interviews, and real-world algorithm reasoning.

Features

Search Algorithms

  • Linear Search
  • Binary Search (iterative, invariant-based)

Sorting Algorithms

  • Insertion Sort (in-place, stable)
  • Merge Sort (divide-and-conquer, O(n log n))
  • Quick Sort (in-place, average O(n log n))

Usage

Install

pip install algokit-py

Search

from algokit_py.search import linear_search, binary_search

print(linear_search([1, 2, 3], 2))
print(binary_search([1, 2, 3], 2))

Sorting

from algokit_py.sort import insertion_sort, merge_sort, quick_sort

data = [3, 1, 2]

# Insertion Sort (in-place)
insertion_sort(data)
print(data)  # [1, 2, 3]

# Merge Sort (returns new list)
print(merge_sort([3, 1, 2]))  # [1, 2, 3]

# Quick Sort (in-place)
data = [3, 1, 2]
quick_sort(data)
print(data)  # [1, 2, 3]

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

algokit_py-0.4.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

algokit_py-0.4.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file algokit_py-0.4.1.tar.gz.

File metadata

  • Download URL: algokit_py-0.4.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for algokit_py-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e351707047d146ffb074b8647c4648232eda9d441cea29eb14a2b0360bd3ac2f
MD5 1aec1381fa2628a89e5e0e1a973f49a9
BLAKE2b-256 93bc97422b138caffceedf9745fa21595d41e3ff9b9e47e94f1010284ff87ff0

See more details on using hashes here.

File details

Details for the file algokit_py-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: algokit_py-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for algokit_py-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b999d21976d32663b65f6900310ba04b47dd62e65e1fae06fdc2561078767d20
MD5 d5a5c4c41021015bdca737ab3e2ba60d
BLAKE2b-256 c614bde27c85bfaf81d38cde9794f112720ad4dc4b0b8c38a1f77f99d5dbdda9

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