Skip to content

warmachine028/datastax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

updated: Thursday, 03rd August 2023
datastax

Simplicity meets intelligence

PyPI PyPI Downloads


What's New?

  • Refactored Trees
  • Added Nodes SubPackage
  • Separated TreeNodes into Nodes
  • Added Tables SubPackage
  • Added Colors and ColorCodes in Utils
  • Refactored Lists
  • Removed __repr__ overrides
  • Added Exceptions in Utils
  • Added Warnings in Utils
  • Added new workflows
  • Added datastax.Wiki

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

Documentation

  • For detailed documentation. See documentation
  • (Still in progress)

License

Pritam, 2023