Skip to main content

A python library to handle dataStructures

Project description

updated: Sunday, 11th July 2023
datastax

Simplicity meets intelligence

PyPI PyPI Downloads


dataStax

What's New?

  • Refactored linkedlists -> Lists
  • Refactored arrays -> Arrays
  • Refactored private_lists -> AbstractLists
  • Refactored AbstractLists by converting all items to AbstractClass to prevent direct initialization.
  • Module Conventions converted to uppercase CamelCase from lowercase snake_case

Table of Contents

Introduction

  • This library offers a simple yet powerful solution for implementing common abstract data structures.
  • With a pure Python implementation, it provides representations of tree, linked list, and array-based data structures accessible through a basic command prompt interface.
  • The package includes visualization features that enhance the understanding of each data structure.
  • Students can greatly benefit from utilizing this package for their learning and educational purposes.
  • Please note that this project is currently a work in progress and undergoing active development.

Problem Statement

  • Many CS students encounter difficulties in comprehending the intricate internal architecture of complex Abstract Data Types (ADTs) during the initial stages of their B.Tech course.
  • When attempting to solve coding challenges that involve writing test cases using these ADTs, it becomes excessively burdensome to manually create these data structures from scratch.
  • Furthermore, while developing programs that implement these ADTs, numerous errors are encountered due to the inability to visualize and understand the underlying processes of these data structures.

Benefits

  • Swift installation process
  • Efficient and prompt updates
  • Minimal disk space usage due to its small size
  • No additional modules or dependencies needed
  • Developed entirely from scratch
  • Upcoming user-friendly documentation
  • Command line demonstration for easy usage

Requirements

  • Runs on latest Python 3.11+
  • (Suggesting you to always update to the latest python version)

Installation

  1. Use the python package manager pip to install datastax.
pip install datastax

Usage

Demo

  • To get a demo of the library use the following command

    • Windows:
    > py -m datastax 
    
    • Unix based systems:
    $ python3 -m datastax
    
    • Result
    Available modules are:
    1. LinkedLists
    2. Trees
    3. Arrays
    
    Usage
    > py datastax <data-structure> [data]
    Data Structures:
    ->  trees          Hierarchical DS
    ->  linkedlists    Linear DS
    ->  arrays         Fixed Size Linear DS
    
  • Then follow as the instruction guides

> py -m datastax linkedlist 1 2 3 4
  Visuals for LinkedLists:

  1. Singly Linked List:
     HEAD                                         TAIL
 ┌─────╥────┐   ┌─────╥────┐   ┌─────╥────┐   ┌─────╥────┐
   1    ----->│  2    ----->│  3    ----->│  4    -----> NULL
 └─────╨────┘   └─────╨────┘   └─────╨────┘   └─────╨────┘


  2. Doubly Linked List:
               HEAD                                                        TAIL
         ┌────╥─────╥────┐   ┌────╥─────╥────┐   ┌────╥─────╥────┐   ┌────╥─────╥────┐
 NULL <-----    1    <------->    2    <------->    3    <------->    4    -----> NULL
         └────╨─────╨────┘   └────╨─────╨────┘   └────╨─────╨────┘   └────╨─────╨────┘
  ...

Practical Usage

  • Queue

queue

queue_output



  • BinaryTree

binaryTree

binaryTree_output


  • MinHeapTree

mht

mht_output


  • ThreadedBinaryTree

tbt

tbt_output


  • SumSegmentTree

sst

sst_output


  • HuffmanTree

hft

hft_output


  • RedBlackTree

rbt

rbt_output

What's Next

  • Enhanced Documentation
  • Better TestCases for Huffman Tree
  • Better TestCases for Segment Trees
  • Test Cases for Fibonacci Tree
  • Refactoring Arrays SubPackage

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datastax-0.4.0.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

datastax-0.4.0-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file datastax-0.4.0.tar.gz.

File metadata

  • Download URL: datastax-0.4.0.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for datastax-0.4.0.tar.gz
Algorithm Hash digest
SHA256 176cd7b8e8749dab56aed5398dba7b14bebb1164cb0e33845140aa9eb3087e6f
MD5 a10cbbf682c330f5d56ea911caf8e72d
BLAKE2b-256 acdc02b8f758da92018723fd4fade22bc3b03a2aaad098ea24885d0beb4a2119

See more details on using hashes here.

File details

Details for the file datastax-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: datastax-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 52.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for datastax-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 714b736f1c0e9643e61a965fb8bf047bede8015ee36fc4eb71497c29928d2646
MD5 bf2229c506f067999f2a46a0171d88ed
BLAKE2b-256 bf5f29ba5d9f8350078dfde2e97bf1047d693f2d24a9e2d01b087c883f8964ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page