Skip to main content

AlgoNest

AlgoNest is a Python toolkit for reusable algorithms, data structures, and small utility helpers. It gives developers a consistent, iterable-first API for common problems without rebuilding the same primitives each time.

Problem Statement

Many algorithm libraries are either classroom examples or narrow problem-specific snippets. AlgoNest is built as a practical toolkit instead: a collection of reusable building blocks for search, sorting, trees, graphs, dynamic programming, strings, math, and supporting utilities. It is useful when you want clean, typed implementations that are easy to import, compose, and reuse in exercises, interview prep, and real code.

Target Audience

AlgoNest is for:

  • Students learning core data structures and algorithm patterns
  • Developers preparing for interviews
  • Engineers who want reliable reference implementations
  • Maintainers who need compact reusable helpers instead of one-off snippets

Key Features

  • arrays/: interval helpers, prefix sums, two pointers, Kadane, rotations, and matrix utilities
  • search/: linear, binary, rotated, exponential, interpolation, jump, ternary, and 2D matrix search
  • sort/: classic and advanced sorting implementations
  • linked_list/: singly, doubly, and circular list structures plus linked-list algorithms
  • stack_queue/: stacks, queues, deques, monotonic stack utilities, and expression helpers
  • heap/: min/max heaps, priority queue, top-k helpers, merge helpers, and median tracking
  • trees/: binary trees, BSTs, AVL trees, segment trees, Fenwick trees, traversals, views, and path helpers
  • graphs/: traversal, shortest path, MST, SCC, bipartite, DSU, and representation helpers
  • dynamic_programming/: Fibonacci, knapsack, coin change, LCS, LIS, edit distance, subset DP, and grid DP
  • strings/: trie, anagram helpers, KMP, Rabin-Karp, Z algorithm, rolling hash, and palindrome helpers
  • math/: number theory, modular arithmetic, combinatorics, matrix math, statistics, and bit manipulation
  • backtracking/: combinations, permutations, subsets, and combination sum helpers
  • greedy/: activity selection, fractional knapsack, jump-game helpers, and reachability logic
  • nodes/ and utils/: shared node types, validation, testing helpers, I/O helpers, and debug utilities

Installation

pip install algonest

For local development:

pip install -e .

Quick Usage Examples

from algonest import binary_search, search_2d_matrix

index = binary_search([1, 3, 5, 7, 9], 7)
location = search_2d_matrix([[1, 4, 7], [10, 13, 16]], 13)

Arrays

from algonest import max_subarray_sum, prefix_sum, range_sum

best = max_subarray_sum([-2, 1, -3, 4, -1, 2, 1, -5, 4])
prefix_values = prefix_sum([1, 2, 3, 4])
window_total = range_sum(prefix_values, 1, 3)

Trees

from algonest import BinaryTree

tree = BinaryTree()
for value in [5, 3, 8, 1, 4]:
	tree.insert(value)

height = tree.height()
balanced = tree.is_balanced()

Strings

from algonest import Trie, kmp_search

trie = Trie()
trie.insert("algo")
matches = kmp_search("ababcabcab", "abc")

Project Structure

AlgoNest/
|-- algonest/
|   |-- arrays/
|   |-- backtracking/
|   |-- dynamic_programming/
|   |-- graphs/
|   |-- greedy/
|   |-- heap/
|   |-- linked_list/
|   |-- math/
|   |-- nodes/
|   |-- search/
|   |-- sort/
|   |-- stack_queue/
|   |-- strings/
|   |-- trees/
|   `-- utils/
|-- benchmarks/
|-- docs/
|   `-- Project Structure.md
|-- tests/
|-- ALGONEST_API.md
|-- CONTRIBUTING.md
|-- CODE_OF_CONDUCT.md
|-- README.md
`-- pyproject.toml

Design Philosophy

AlgoNest is a toolkit, not a problem bank. The goal is to provide small, reusable implementations with consistent naming, clear signatures, and predictable behavior so the package is useful as a reference and as a foundation for real code.

Development Notes

  • Tests are organized with pytest under tests/.
  • Public API signatures are documented in ALGONEST_API.md.
  • Contribution guidance is in CONTRIBUTING.md.

License

AlgoNest is released under the MIT License. See LICENSE for details.

Metadata

Release files for algonest 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for algonest 0.1.2
File Size Uploaded Provenance Actions
algonest-0.1.2.tar.gz 53.4 kB Without provenance Details for algonest-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for algonest 0.1.2
File Interpreter ABI Platform Actions
algonest-0.1.2-py3-none-any.whl Python 3 none any Details for algonest-0.1.2-py3-none-any.whl

Total release size: 140.9 kB

Release files / algonest-0.1.2.tar.gz

Download URL algonest-0.1.2.tar.gz
Size 53.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1aa9da31b99775ef11b98ad2a6455a029f4299ba26d8b6b71af3c77412b34da2
BLAKE2b-256 checksum
How to use checksums
1c9e646a616bfdfada52bc10f7941679ec0f1d7a3e76a7fd2a501896b30e1642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / algonest-0.1.2-py3-none-any.whl

Download URL algonest-0.1.2-py3-none-any.whl
Size 87.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aec4b179ebfbf4f41a4393bb7dd2c46dd3d84fb74599c66d5d0e2fba8e7ff45d
BLAKE2b-256 checksum
How to use checksums
4efac1c27bc94c33795bdd5be5fbcafcae6ede10fd390e20b96c85a084e2c81f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for algonest 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page