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.4.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.4-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyds_fundamental-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 1672954d888820efaddb889eea1e83833fa47537a979599b1ed90c06bec21d95
MD5 79d5e38fb49e9314e4434cfdf215d1e6
BLAKE2b-256 3412c6468f9aff033cad2a29d0363ee9c3eeded78d51b0cbb4bffdb9bc568a1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyds_fundamental-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f81d5c325d7d3f7ce56ac50ecb85914011d9c0ccfca5eee97ac0f17c2bd8f67e
MD5 fe8c00dcf45c1b8835d19da49bb5b1ed
BLAKE2b-256 3f0b47ca757621fa7943f5d7636788b21cf2359d38b31cfa9bd65e9c9546da1c

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