This project provides an interactive data structure visualizer built with Streamlit. It allows users to explore various data structures such as Stack, Queue, ChainMap, Deque, Priority Queue, Binary Tree, Graph, Linked List, and Heap with easy-to-use visualizations. The app leverages Python libraries like Matplotlib, NetworkX, and Heapq to present visual representations of these data structures.
- Stack: Visualize push and pop operations with the LIFO (Last In First Out) principle.
- Queue: Explore enqueue and dequeue operations with the FIFO (First In First Out) principle.
- ChainMap: View how multiple dictionaries can be combined and managed using
ChainMap
. - Deque: Interact with a double-ended queue, enabling insertion and deletion from both ends.
- Priority Queue: Visualize insertion and removal of elements with associated priorities.
- Binary Tree: Build and visualize a simple binary tree structure.
- Graph: Visualize an undirected graph with user-defined edges.
- Linked List: Perform insertions and deletions on a linked list.
- Heap: Interact with a heap, inserting elements and removing the minimum.
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/data-structure-visualizer.git cd data-structure-visualizer
-
Run the Streamlit App
After installing the dependencies, run the Streamlit app with the following command:
streamlit run app.py