Skip to content

naggynab/DSA-Project

Repository files navigation

B-Tree Insertion & Visualization

Project Overview

This project visualizes the insertion process in a B-Tree — a balanced tree data structure used in databases and file systems. It demonstrates how nodes split dynamically to maintain balance as elements are inserted. Developed as part of the Data Structures and Algorithms (DSA) project.

Features:

  • Step-by-step visualization of B-Tree insertions

  • Dynamic node splitting and balancing

  • Interactive and educational tool for DSA learning

Project Setup Guide

This guide explains how to clone the repository, set up dependencies, and run the visualization on Linux and Windows.

🔽 Clone the Repository

git clone https://github.com/yourusername/DSA-Project.git
cd b-tree-visualization

Linux Setup

1️⃣ Install Dependencies

sudo apt update
sudo apt install python3 python3-pip -y
pip install -r requirements.txt

2️⃣ Run the Project

python3 b-tree_visualization.py

Windows Setup

1️⃣ Install Dependencies

Install Python 3.13.8

Open Command Prompt and install the required packages:

pip install -r requirements.txt

2️⃣ Run the Project

 python b-tree_visualization.py

Folder Structure

DSA-project/
│
├── btree_visualization.py     # Main visualization code
├── requirements.txt           # Dependencies
├── README.md                  # Project documentation
└── assets/                    # (Optional) Images or screenshots

Notes

  • Ensure matplotlib is installed properly.

  • Run the script in a Python environment (like VS Code or PyCharm).

  • If you encounter display issues, update your Python graphics backend or use %matplotlib inline in notebooks.

💡 Example Output

Shows a graphical visualization of B-Tree node insertions — keys appear inside boxes, and splitting is shown dynamically.

About

A Python-based project that demonstrates AVL Tree insertion with real-time visualization of rotations and balancing. The tool helps users understand how AVL Trees maintain height balance after each insertion, making it ideal for learning and teaching Data Structures and Algorithms (DSA) concepts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors