Skip to main content

Comprehensive Data Structures, Algorithms, and Design Patterns Library

Project description

AlgoZen: Your Complete DSA and Interview Preparation Library

AlgoZen is a comprehensive Python library that provides efficient implementations of data structures, algorithms, and common interview problems. It's designed to help developers practice and prepare for technical interviews at top tech companies.

Features

Core Data Structures

  • Linked Lists (Singly and Doubly linked)
  • Stack and Queue implementations
  • Trees (Binary Tree, BST, AVL Tree)
  • Hash Table with dynamic resizing
  • Heap (MinHeap and MaxHeap variants)

Advanced Data Structures

  • Skip List (probabilistic data structure)
  • Disjoint Set (Union-Find)
  • Trie (Prefix Tree)
  • Fenwick Tree (Binary Indexed Tree)
  • Segment Tree (for range queries)

Algorithms

  • Sorting (Quick Sort, Merge Sort, Heap Sort)
  • Searching (Binary Search, Linear Search, Interpolation Search)
  • Graph algorithms with BFS, DFS, and Dijkstra's
  • Dynamic Programming solutions

Design Patterns

Basic Patterns

  • Creational: Singleton, Builder
  • Structural: Adapter, Decorator
  • Behavioral: Observer, Strategy, Command
  • Chain of Responsibility
  • State and Memento

Advanced Patterns

  • Flyweight (memory optimization)
  • Composite (tree structures)
  • Prototype (object cloning)
  • Bridge (platform independence)
  • Proxy (access control)
  • Interpreter (DSL parsing)
  • Visitor (extending functionality)
  • Mediator (object interactions)
  • Specification (business rules)

System Design Components

  • Rate Limiter
  • Consistent Hashing
  • Bloom Filter
  • Leader Election
  • Event Bus
  • Circuit Breaker

Interview Preparation

  • Common DSA problems from top tech companies
  • System Design implementations
  • Time and space complexity analysis
  • Best practices and optimization techniques

Installation

pip install algozen

Quick Start

from algozen.data_structures import LinkedList, BST, MinHeap
from algozen.data_structures.advanced import SkipList, Trie
from algozen.sorting import quick_sort, merge_sort
from algozen.interview_prep import two_sum, lru_cache
from algozen.system_design import RateLimiter, ConsistentHashing
from algozen.design_patterns import Singleton, Observer
from algozen.design_patterns_advanced import Flyweight, Specification

# Use advanced data structures
skip_list = SkipList()
skip_list.insert(5)
skip_list.insert(10)

trie = Trie()
trie.insert("hello")
print(trie.search("hello"))  # True

# Apply advanced design patterns
flyweight_factory = FlyweightFactory()
flyweight = flyweight_factory.get_flyweight("shared_state")

# Create business rules
class PriceSpecification(Specification):
    def __init__(self, min_price: float, max_price: float):
        self.min_price = min_price
        self.max_price = max_price
    
    def is_satisfied_by(self, price: float) -> bool:
        return self.min_price <= price <= self.max_price

# Combine specifications
low_price = PriceSpecification(0, 50)
high_price = PriceSpecification(100, float('inf'))
medium_or_high = low_price.or_(high_price)

Documentation

For detailed documentation and examples, visit our documentation page.

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

See CHANGELOG.md for a list of changes and version history.

Support

If you have any questions or need help, please:

  1. Check our documentation
  2. Open an issue on GitHub
  3. Join our community discussions

Acknowledgments

Special thanks to all contributors who have helped make AlgoZen a comprehensive resource for DSA and interview preparation.

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

algozen-1.2.1.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

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

algozen-1.2.1-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file algozen-1.2.1.tar.gz.

File metadata

  • Download URL: algozen-1.2.1.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for algozen-1.2.1.tar.gz
Algorithm Hash digest
SHA256 9910c8ea942c2eedf198523d0d8d58c372858b3288b5f354019a627bc8efb9b1
MD5 63cc9c51a5438e8c784d26563c089646
BLAKE2b-256 ec4a2f56e726f15b7a117acc963e32cbac64c1507117a96e706cdecc8ff72c78

See more details on using hashes here.

File details

Details for the file algozen-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: algozen-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for algozen-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c148eb5bbf32619d1a9820b32d4f67bc2605ed6518e33726abe723f8fba01e4
MD5 51b685abb47c3e4e63df36b32c224ba7
BLAKE2b-256 93661281d0bddc360967155e870d89ce1eedb0239df78f40d8cf4010fe45e4f9

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