Skip to main content

A collection of Python data structures for educational purposes

Project description

PyHelper

Python implementations of fundamental data structures for learning and practical use.

What is this?

PyHelper provides clean, well-tested implementations of common data structures:

  • Lists: Linked, Double, Circular
  • Graphs: Undirected, Directed, Weighted (with visualization & Dijkstra)
  • Skip Lists: Deterministic and Probabilistic

Prerequisites

pip install networkx matplotlib pytest

Installation

Install from local directory (for development)

pip install -e .

Install from local directory (regular installation)

pip install .

Install from GitHub

pip install git+https://github.com/Djey8/PyHelper.git

Install from PyPI

pip install pyhelper-jkluess

Quick Start

Linked List

from Basic.Lists.linked_list import LinkedList

ll = LinkedList()
ll.append(10)
ll.append(20)
ll.print_list()  # 10 -> 20 -> None

Graph

from Complex.Graphs.undirected_graph import UndirectedGraph

g = UndirectedGraph()
g.add_edge("A", "B")
print(g.get_neighbors("A"))  # ['B']
g.visualize()  # Opens matplotlib window

Skip List

from Complex.SkipLists.probabilisticskiplist import ProbabilisticSkipList

sl = ProbabilisticSkipList()
sl.add(10)
sl.add(20)
print(sl.find(10))  # 10

Structure

PyHelper/
├── Basic/Lists/          # Linked list implementations
├── Complex/Graphs/       # Graph data structures
└── Complex/SkipLists/    # Skip list implementations

Documentation

  • Basic Lists - LinkedList, DoubleLinkedList, CircularLinkedList
  • Graphs - UndirectedGraph, DirectedGraph, WeightedUndirectedGraph, WeightedDirectedGraph
    • Includes: Paths, cycles, connectivity, adjacency matrices, Dijkstra's algorithm
  • Skip Lists - SkipList, ProbabilisticSkipList

Testing

pytest tests/ -v  # 184 tests

License

MIT License

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

pyhelper_jkluess-0.2.1.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

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

pyhelper_jkluess-0.2.1-py3-none-any.whl (64.7 kB view details)

Uploaded Python 3

File details

Details for the file pyhelper_jkluess-0.2.1.tar.gz.

File metadata

  • Download URL: pyhelper_jkluess-0.2.1.tar.gz
  • Upload date:
  • Size: 48.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyhelper_jkluess-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ea2555085a66794de596a5e7f6163a7d5100a6c8cd15d3cfcd482139afef103a
MD5 b491f750e4fd7c3c72176d1aab00e0cd
BLAKE2b-256 b9511d1791b6a5b26aa07100ae7e5fc5e06529452d2e202083ce0cd24febb260

See more details on using hashes here.

File details

Details for the file pyhelper_jkluess-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyhelper_jkluess-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e02df2a97b2ff93ce137bd36c79edba3d84cedc2a3c949b03b6d03f189649ab4
MD5 c5e1140c05cd69a7bd18c09cfa46d89b
BLAKE2b-256 f930df716981047be16a9c934ccdcf05b931e6c654b60b86fd1f9c8e2fea6c27

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