Skip to main content

Production-ready implementation of fundamental data structures implemented in Python

Project description

pyds-fundamental: An Implementation of Data Structures

pyds-fundamentaldata_structures contains implementations of various data structures.

Currently trying to make this a fully functioning library where you can basically use implemented data structures as-intended.

To see all the functionalities, check out the document here.

Current data structures are:

  • Linked Lists
    • Singly Linked List
    • Doubly Linked List
  • Stacks
    • Array Stack
    • Linked Stack (Using Linked List)
  • Queues
    • Array Queue
    • Linked Queue (Using Linked List)
    • Circular Queue
    • Priority Qeueue (Using Linked List)
  • Binary Search Tree
  • AVL Tree
  • Red-Black Tree

To download this package, go to terminal:

pip install pyds-fundamental

Example usage:

from data_structures import BinarySearchTree, AVLTree

bst = BinarySearchTree()
bst.insert(12)
bst.insert(8)
bst.insert(16)

for node in bst.inorder_traversal():
    print(node)

# 8
# 12
# 16

import random

avl = AVLTree()
for _ in range(20):
    avl.insert(random.randint(0, 100))
avl.pretty_print()

# Output:

           ________59___________     
          /                     \    
   ______15___           ______88_   
  /           \         /         \  
 _9___       20_       66___     95_ 
/     \     /   \     /     \       \
3    13_   19  41_   64    70_     98
 \  /   \         \       /   \      
 8 11  13        46      68  75 

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

pyds_fundamental-0.1.5.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

pyds_fundamental-0.1.5-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file pyds_fundamental-0.1.5.tar.gz.

File metadata

  • Download URL: pyds_fundamental-0.1.5.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyds_fundamental-0.1.5.tar.gz
Algorithm Hash digest
SHA256 15c502032affe78e34c855627866115396ca9e7215197181f5c00be7e2962465
MD5 319b6440dc9fddc8dbaa0ca1f6ebd9df
BLAKE2b-256 18091c42e80cc7dae34e856ef64b4510bd349e37573d88b67becd4e6e6094b98

See more details on using hashes here.

File details

Details for the file pyds_fundamental-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pyds_fundamental-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7e2bbf606f3b31093dc576515f0c49314be27a6cf8a50c3a91b031177af7a1ed
MD5 ae50f387e5fd6d778e6a88b30be650eb
BLAKE2b-256 3d05a2c9edd83e22335344387e2b3cf0ea55014be8a487ea2d6a4e06bc934f97

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