Skip to main content

A strictly typed, 100% test-covered data structures and algorithms library.

Project description

pure-python-ds 🚀

A high-performance, strictly-typed, and memory-optimized Data Structures and Algorithms library built in Pure Python.

🏗️ Architecture Overview

This library was designed with a focus on Systems Architecture. By utilizing Python's __slots__, every node in this library is memory-optimized to reduce overhead, making it suitable for educational deep-dives and performance-sensitive prototyping.

[Image of a software architecture diagram showing layers of data structures and algorithms]

🛠️ Key Features

1. Linear Data Structures

  • Linked Lists: Singly and Doubly Linked Lists with $O(1)$ head/tail operations.
  • Stacks & Queues: Built on top of optimized linked nodes for strict LIFO/FIFO behavior.

2. Hierarchical & Network Structures

  • Binary Search Trees (BST): Standard ordered trees with recursive and iterative implementations.
  • AVL Trees: Self-balancing trees using rotation logic to guarantee $O(\log n)$ performance.
  • Graphs: Adjacency-list based implementation supporting both Directed and Undirected networks.

3. Advanced Algorithms

  • Pathfinding: Dijkstra's Algorithm for finding shortest paths in weighted graphs.
  • Sorting: $O(n \log n)$ Merge Sort implementation.
  • Searching: $O(\log n)$ Binary Search.
  • Dynamic Programming: Memoized Fibonacci and sub-problem optimization.

[Image of a perfectly balanced Binary Search Tree demonstrating O(log n) structure]

🚀 Installation

Since the package is in "Editable" mode, you can install it locally to use across your entire system:

git clone [https://github.com/ParjadM/pure-python-ds.git](https://github.com/ParjadM/pure-python-ds.git)
cd pure-python-ds
pip install -e .

🚀 Technical Milestone: 83% Unit Test Coverage Reached Core Engineering Accomplishments:

Robustness Verification: Engineered a comprehensive regression suite achieving 83% total coverage across 15+ complex data structures.

Algorithm Integration: Successfully implemented and verified Kruskal’s MST (using custom DSU), Bellman-Ford, and Dijkstra’s algorithms.

Recursive Tree Logic: Developed and tested memory-safe recursive deletion with rebalancing for AVL and Binary Search Trees.

Performance Optimization: Leveraged slots and Python Generators to ensure O(1) space complexity for tree traversals and minimal memory footprint.

Coverage Build

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

pure_python_ds-1.0.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

pure_python_ds-1.0.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file pure_python_ds-1.0.0.tar.gz.

File metadata

  • Download URL: pure_python_ds-1.0.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pure_python_ds-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9fca2fc2e1f4b2f04a47345dd8fbbbc9f1854c2efa643585c4a64c39c3e5575f
MD5 c0e59d212a12ed224f7c5e5ebc80f223
BLAKE2b-256 4f50c23cfdbaf09f41f3cff4a35bb6f281cadd7821490d6a5b99c0e44594eb55

See more details on using hashes here.

File details

Details for the file pure_python_ds-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pure_python_ds-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pure_python_ds-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cf2c3a97181e3343f8a47c23baf61635410fa225bd7fa84866d08e05a1538cb
MD5 cdaa06fc517f37769bb21d7ff767af7b
BLAKE2b-256 8f48fbfbbaa34a549ed5821c038ceb4c0ef771ee746081af49076fc4e0797673

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