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: Unified Graph class + specialized types (Undirected, Directed, Weighted) with visualization & graph theory operations
  • 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 (Unified Class - Recommended)

from Complex.Graphs.graph import Graph

# Create any graph type with parameters
g = Graph(directed=False, weighted=True)
g.add_edge("A", "B", 10)
print(g.get_neighbors("A"))  # ['B']
print(g.get_edge_weight("A", "B"))  # 10
g.visualize()  # Opens matplotlib window

# Or use specialized classes
from Complex.Graphs.undirected_graph import UndirectedGraph
g2 = UndirectedGraph()
g2.add_edge("A", "B")

Skip List

from Complex.SkipLists.probabilisticskiplist import ProbabilisticSkipList

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

Structure

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

Documentation

  • Basic Lists - LinkedList, DoubleLinkedList, CircularLinkedList
  • Graphs - Graph (unified), UndirectedGraph, DirectedGraph, WeightedUndirectedGraph, WeightedDirectedGraph
    • Includes: Paths, cycles, connectivity, adjacency matrices, Dijkstra's algorithm
    • NEW: Unified Graph class adapts to all 4 types based on initialization
  • 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.2.tar.gz (43.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.2-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyhelper_jkluess-0.2.2.tar.gz
  • Upload date:
  • Size: 43.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.2.tar.gz
Algorithm Hash digest
SHA256 69927b8854a74fb6dd936335ab58411e2b2f83c1d18125363def1a7a0919e6ed
MD5 edc3dab365297322983f9085c19c7c48
BLAKE2b-256 121adcc3a96c84a63e25215c62bee8bb11b0492830d47cadb430467cff9c5099

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyhelper_jkluess-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2aaba33abde0d3aef87cd225e9a66837522c2375e91f90fe41079421dcedae66
MD5 f5845869790da2af58f7ab664f306853
BLAKE2b-256 3c42188f71898047cb024ac68df89729b0f9dfd87a0deea85e298031a6abd251

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