Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T13:52:46.000Z (about 1 year ago)
- Last Synced: 2024-05-29T12:34:08.576Z (7 months 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**
![queue](https://github.com/warmachine028/datastax/assets/75939390/e62ba451-f499-45dc-bcb9-9e29ebfe6dbd)
![queue_output](https://github.com/warmachine028/datastax/assets/75939390/daecb209-d459-4374-96e0-816deb08dcde)
---------------------------------------------------
- **BinaryTree**
![binaryTree](https://github.com/warmachine028/datastax/assets/75939390/7228c4b4-def7-4c6b-9e29-e6e244c2c4c1)
![binaryTree_output](https://github.com/warmachine028/datastax/assets/75939390/2357fa58-3122-47ad-ac7f-f67d72ef6e8c)
---------------------------------------------------
- **MinHeapTree**
![mht](https://github.com/warmachine028/datastax/assets/75939390/1c00a207-9ea0-4965-898f-29e37883fac5)
![mht_output](https://github.com/warmachine028/datastax/assets/75939390/fcfe24d9-6b80-4b16-873c-3f5c3d808d70)
---------------------------------------------------
- **ThreadedBinaryTree**
![tbt](https://github.com/warmachine028/datastax/assets/75939390/ab2f2572-1474-4d82-9138-b8ee85869114)
![tbt_output](https://github.com/warmachine028/datastax/assets/75939390/9e77c5dc-082c-471b-90d5-33792673bdf3)
---------------------------------------------------
- **SumSegmentTree**
![sst](https://github.com/warmachine028/datastax/assets/75939390/7bdcfd6e-37ac-4421-b6d2-acd59cf4976c)
![sst_output](https://github.com/warmachine028/datastax/assets/75939390/3a3f1de2-72e8-4b1d-88c7-40e4dcc11215)
---------------------------------------------------
- **HuffmanTree**
![hft](https://github.com/warmachine028/datastax/assets/75939390/bab7da94-624f-40ac-b746-463157e84cdf)
![hft_output](https://github.com/warmachine028/datastax/assets/75939390/2de13da6-8eaa-4e62-a06a-8dbf91c008a2)
---------------------------------------------------
- **RedBlackTree**
![rbt](https://github.com/warmachine028/datastax/assets/75939390/8d924d6e-d63a-4891-bf9e-c7acdb3775ba)
![rbt_output](https://github.com/warmachine028/datastax/assets/75939390/3af4ceb6-1e68-4906-ba39-db84dbf274f0)
## 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