Skip to main content

A python library to handle dataStructures

Project description

updated: Wednesday, 6th April 2022
datastax

Simplicity meets intelligence

PyPI PyPI Downloads


dataStax

What's New?

  • Added Mandatory Keyword arguments to avoid confusion in:
    • Arrays
    • ThreadedBinaryTree
  • Added High Quality PNGs in README.md

Table of Contents

Introduction

  • This is a very simple yet powerful project to implement day to day abstract data structures
  • A pure implementation of Python in representing Tree, Linkedlist and Array based datastructures in basic command prompt
  • It helps visualize each data structure for better understanding
  • Students can be beneficial in using this Package
  • This project is still under construction

Problem Statement

  • Often at the beginning of B.Tech Course, CS students face a lot of problems understanding the internal architecture of complex ADTs.
  • While solving coding challenges locally where test cases have to be written using these ADTs, it becomes really cumbersome to write these data structures from scratch.
  • Also, when writing programs which implements these ADS, we encounter lots of errors just because we are unable to preview what's actually going on under the hood.

Benefits

  • Instant installation
  • Quick Updates
  • Very small size
  • No extra modules required
  • Written purely from scratch
  • Easy Documentation [Upcoming]
  • Command Line Demo

Requirements

  • Runs on latest Python 3.7+
  • (WARNING: Though the module might run on py 3.7 error free, but it has been tested for 3.9+)
  • (Suggesting you to always update to the latest python version)
  • This Library requires no extra modules

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

MinHeapTree

MinHeapTree_output


  • ThreadedBinaryTree

ThreadedBinaryTree

ThreadedBinaryTree_output


  • SumSegmentTree

SumSegmentTree

SumSegmentTree_Output


  • HuffmanTree

HuffmanTree

HuffmanTree_Output


  • RedBlackTree

RedBlackTree

RedBlackTreeOutput

What's Next

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

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.3.1.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

datastax-0.3.1-py3-none-any.whl (47.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: datastax-0.3.1.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for datastax-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2271015d80fc0759af52d4ac993b33d90bfee6f6d82d74e223bd131815f51ec1
MD5 982065d99afaee6f1e473a51e9686aa6
BLAKE2b-256 7ff4880c30e3db09d40f0627e0be4d03be49d700ffc66fb7a0b0c8102ac81e88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: datastax-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 47.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for datastax-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d991370eed8934ce0d834f55989de4f225847264b2680eeae46d6ff299eb6f97
MD5 ef0b0447d3f6994de9d4e564ac10cd3d
BLAKE2b-256 d51ed10d6da3e4d84decae3cd1e2d817f08edcfd6ad8790a42920803d09f8d73

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