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

Currently Working On: AVL-Trees.

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.3.tar.gz (16.2 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.3-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyds_fundamental-0.1.3.tar.gz
  • Upload date:
  • Size: 16.2 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.3.tar.gz
Algorithm Hash digest
SHA256 f0eed41912b81feccd4a39f645ec4cb981ec07d832681c2bf568b611075c9426
MD5 843e9167c98e003e62335ed075e809f3
BLAKE2b-256 1e2fa4fb1fbedc4a71ff75a0ed0897d7af2ac53bfb33b7ecabb8c8a47b890ff7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyds_fundamental-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8d867da7112696da0f6515a96e66302be1326f6f0beebeaea87d36a9233b96
MD5 8235d22f9a58fcd1287167c2080ad1d2
BLAKE2b-256 a2a08b307b88200e853ac6dfd217f196679821809fda7a5a0591c29ac9f59ec9

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