Lightweight DSA utilities for Python
Project description
AlgoNest
algonest is a clean, reusable Python DSA utility package focused on production-ready implementations of core algorithmic patterns.
Installation
pip install algonest
Included Modules
algonest.search.binary_search:lower_bound,upper_bound,binary_searchalgonest.arrays.sliding_window:max_sum_subarray_k,longest_unique_substringalgonest.sort.sorting: classical sorting algorithmsalgonest.linked_list: linked list data structuresalgonest.stack_queue: stack, queue, deque, monotonic stack utilitiesalgonest.heap: min heap, max heap, priority queuealgonest.trees: binary trees, BST/AVL, traversals, segment/fenwick treesalgonest.graphs: traversal, shortest path, MST, DSU, topological sortingalgonest.dynamic_programming: knapsack, LCS/LIS, coin change, MCM, edit distancealgonest.strings: KMP, Rabin-Karp, Z algorithm, trie, anagram utilitiesalgonest.math: gcd/lcm, prime utilities, modular arithmetic, bit tricksalgonest.utils: validators and shared type helper aliases
Quick Start
from algonest import (
binary_search,
longest_unique_substring,
lower_bound,
max_sum_subarray_k,
upper_bound,
)
idx = lower_bound([1, 2, 2, 4], 2)
hi = upper_bound([1, 2, 2, 4], 2)
pos = binary_search([1, 3, 5, 7], 5)
best = max_sum_subarray_k([2, 1, 5, 1, 3, 2], 3)
size = longest_unique_substring("abcabcbb")
Testing
python -m pytest -q tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
algonest-0.1.0.tar.gz
(29.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
algonest-0.1.0-py3-none-any.whl
(49.9 kB
view details)
File details
Details for the file algonest-0.1.0.tar.gz.
File metadata
- Download URL: algonest-0.1.0.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b36ff19795133ccfbe23a2625b44ccc9e10c1ccc780c9826a95d57d7f85ee2bb
|
|
| MD5 |
31c7bb67cc3b1d84187307a656d9a944
|
|
| BLAKE2b-256 |
07fba087686b293798d4a77e679f2e59ee25d5296bcd93f0854834b5fac5c398
|
File details
Details for the file algonest-0.1.0-py3-none-any.whl.
File metadata
- Download URL: algonest-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd9bc541d55d2ecae943342b3f821a5286ff7278a090d2bf3e3fea6ede303ccd
|
|
| MD5 |
8b18c7e6ad4774a1a0698e343619d847
|
|
| BLAKE2b-256 |
7d627b83f3b5a3764c951f29ac4dd3aeb637a884df5899eb28067a44d2656674
|