https://github.com/warmachine028/datastax
A python library to visualize data-structures
https://github.com/warmachine028/datastax
data-structures flake8 hacktoberfest hacktoberfest-accepted hacktoberfest2023 mypy pypi pytest python python-library python-package typehints
Last synced: 6 months ago
JSON representation
A python library to visualize data-structures
- Host: GitHub
- URL: https://github.com/warmachine028/datastax
- Owner: warmachine028
- License: mit
- Created: 2021-12-15T18:32:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T13:52:46.000Z (about 2 years ago)
- Last Synced: 2024-05-29T12:34:08.576Z (over 1 year ago)
- Topics: data-structures, flake8, hacktoberfest, hacktoberfest-accepted, hacktoberfest2023, mypy, pypi, pytest, python, python-library, python-package, typehints
- Language: Python
- Homepage: https://pypi.org/project/datastax
- Size: 6.07 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
updated: Thursday, 03rd August 2023
# [dataStax](https://github.com/warmachine028/datastax)
## 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
- [What's New](#whats-new)
- [Introduction](#introduction)
- [Problem Statement](#problem-statement)
- [Benefits](#benefits)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [License](#license)
## 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](https://pip.pypa.io/en/stable/) to install datastax.
```bash
pip install datastax
```
## Usage
### Demo
- To get a demo of the library use the following command
- **Windows**:
```bash
> py -m datastax
```
- **Unix based systems**:
```bash
$ python3 -m datastax
```
- _Result_
```bash
Available modules are:
1. LinkedLists
2. Trees
3. Arrays
Usage
> py datastax [data]
Data Structures:
-> Trees Hierarchical DS
-> linkedlists Linear DS
-> arrays Fixed Size Linear DS
```
- Then follow as the instruction guides
```bash
> 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**


---------------------------------------------------
- **BinaryTree**


---------------------------------------------------
- **MinHeapTree**


---------------------------------------------------
- **ThreadedBinaryTree**


---------------------------------------------------
- **SumSegmentTree**


---------------------------------------------------
- **HuffmanTree**


---------------------------------------------------
- **RedBlackTree**


## Documentation
- For detailed documentation. See [documentation](https://github.com/warmachine028/datastax/wiki)
- (Still in progress)
## License
- see [LICENSE]
**Pritam, 2023**
[license]: https://github.com/warmachine028/datastax/blob/main/LICENSE