An interactive web-based educational platform for learning Data Structures and Sorting Algorithms through visual representations. This project provides beginner-friendly visualizations to help understand how different data structures and sorting algorithms work.
- Interactive Visualizations: Step-by-step visual representations of algorithms
- Multiple Data Structures: Linear and non-linear data structures
- Sorting Algorithms: Visualize how different sorting techniques work
- User-Friendly Interface: Intuitive UI with smooth animations
- Educational Focus: Perfect for students learning DSA
- Fully Web-Based: No installation required, runs in any modern browser
DSA_visualizer/
├── index.html # Main landing page
├── README.md # Project documentation
├── DataStructures/ # Data structure visualizations
│ ├── index.html # DS navigation hub
│ ├── linearDataStructure/ # Linear DS section
│ │ ├── indexLinear.html
│ │ ├── LinkedList-main/ # Linked List visualization
│ │ │ ├── linkedListIndex.html
│ │ │ ├── style.css
│ │ │ ├── ui.css
│ │ │ └── js/
│ │ │ ├── canvas.js
│ │ │ ├── linkedList.js
│ │ │ ├── script.js
│ │ │ └── ui.js
│ │ ├── Queue/ # Queue implementations
│ │ │ ├── queueIndex.html
│ │ │ ├── queueUsingArray/
│ │ │ │ ├── queueIndex.html
│ │ │ │ ├── script.js
│ │ │ │ └── styles.css
│ │ │ └── queueUsingLinkedList/
│ │ │ ├── queueIndex.html
│ │ │ ├── script.js
│ │ │ └── styles.css
│ │ └── Stack/ # Stack implementations
│ │ ├── stackIndex.html
│ │ ├── stackUsingArray/
│ │ │ ├── stackIndex.html
│ │ │ ├── script.js
│ │ │ └── style.css
│ │ └── stackUsingLinkedList/
│ │ ├── stackIndex.html
│ │ ├── script.js
│ │ └── styles.css
│ └── non-linearDataStructure/ # Non-linear DS section
│ ├── indexNonLinear.html
│ ├── AVL/ # AVL Tree visualization
│ │ ├── avl.html
│ │ ├── script.js
│ │ └── style.css
│ ├── BST Tree/ # Binary Search Tree
│ │ ├── binarySearchTree.html
│ │ ├── BinarySearchTree.js
│ │ ├── BinarySearchTreeNode.js
│ │ ├── main.js
│ │ ├── styles.css
│ │ └── treeVisualizer.js
│ └── Graph/ # Graph visualization
│ ├── index.html
│ ├── script.js
│ └── styles.css
└── SORTING/ # Sorting algorithm visualizations
├── index.html # Sorting hub
├── bubble.html # Bubble Sort
├── insertion.html # Insertion Sort
├── selection.html # Selection Sort
├── mergesort.html # Merge Sort
├── heapsort.html # Heap Sort
└── navigationStyles.css
-
Linked List
- Visual representation of linked list nodes
- Insert, delete, and traversal operations
- Interactive canvas visualization
-
Stack
- Array-based implementation
- Linked list-based implementation
- Push, pop, and peek operations
-
Queue
- Array-based implementation
- Linked list-based implementation
- Enqueue and dequeue operations
-
Binary Search Tree (BST)
- Tree insertion visualization
- Search operations
- Tree traversal (In-order, Pre-order, Post-order)
- Interactive tree building
-
AVL Tree
- Self-balancing binary search tree
- Rotation animations
- Insertion with automatic balancing
-
Graph
- Graph visualization
- Node and edge representation
- Interactive graph building
- Bubble Sort - Simple comparison-based sorting
- Selection Sort - Selection-based sorting algorithm
- Insertion Sort - Incremental sorting approach
- Merge Sort - Divide and conquer algorithm
- Heap Sort - Heap-based sorting technique
- Modern web browser (Chrome, Firefox, Safari, Edge)
- No installation or dependencies required
-
Open the main page:
- Open
index.htmlin your web browser
- Open
-
Navigate to Data Structures:
- Click on "Data Structures" to explore linear and non-linear structures
- Choose from Linear or Non-Linear sections
- Select the data structure you want to visualize
-
Navigate to Sorting Algorithms:
- Click on "Sorting Algorithms" from the main page
- Select any sorting algorithm to see it in action
- Use controls to step through the sorting process
-
Interact with Visualizations:
- Use input fields to add/remove elements
- Use buttons for different operations
- Watch the canvas animation to understand the process
- Use step controls to go through the algorithm at your own pace
- HTML5 - Markup structure
- CSS3 - Styling and animations
- JavaScript (Vanilla) - Algorithm implementation and interactivity
- HTML5 Canvas - Visualization rendering
Each visualization includes:
- Interactive Controls: Input fields and buttons for user interaction
- Visual Representation: Canvas-based animations showing algorithm steps
- Information Display: Real-time information about the current state
- Navigation: Easy navigation between different data structures and algorithms
- Enter values in the input field
- Click "Insert" to add nodes to the visualization
- Watch as nodes are added to the canvas
- See connections between nodes
- Delete nodes and watch the list update
- Visual Learning: See algorithms in action rather than just reading code
- Step-by-Step Execution: Control the pace of algorithm execution
- Multiple Implementations: Compare different implementations (e.g., Stack using Array vs Linked List)
- Interactive Practice: Hands-on experience with data structures
All visualizations follow a consistent structure:
*.html- User interface and HTML structure*.js- Algorithm implementation and interactivity*.css- Styling and animations
- Main Page (
index.html) - Entry point with two main sections - Data Structures Hub (
DataStructures/index.html) - Navigate to linear or non-linear structures - Sorting Algorithms Hub (
SORTING/index.html) - Choose sorting algorithm to visualize - Individual Visualizations - Each algorithm has its own dedicated page
- Clean and intuitive interface
- Responsive design with smooth animations
- Color-coded visualizations for better understanding
- Interactive cards and navigation elements
- Hover effects for better user experience
- ✅ Chrome/Chromium
- ✅ Firefox
- ✅ Safari
- ✅ Edge
- ✅ Mobile browsers (responsive design)
To add new data structures or sorting algorithms:
- Create a new folder in the appropriate section
- Add HTML file with UI elements
- Implement JavaScript logic for the algorithm
- Add CSS styling
- Link it in the navigation (
index.htmlfiles) - Update this README with the new addition
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch
- Add your improvements
- Test thoroughly in multiple browsers
- Submit a pull request
- Educational focus for DSA learners
- Fast and responsive visualizations
- Clear explanations through visual representations
- Pure JavaScript implementation (no framework dependencies)
- Works offline (no external dependencies except textures)
- Linked List:
DataStructures/linearDataStructure/LinkedList-main/linkedListIndex.html - Stack:
DataStructures/linearDataStructure/Stack/stackIndex.html - Queue:
DataStructures/linearDataStructure/Queue/queueIndex.html - Binary Search Tree:
DataStructures/non-linearDataStructure/BST Tree/binarySearchTree.html - AVL Tree:
DataStructures/non-linearDataStructure/AVL/avl.html - Graph:
DataStructures/non-linearDataStructure/Graph/index.html - Sorting:
SORTING/index.html
- Anoop Tripathi
- B.Tech in Artificial Intelligence and Data Science
- IIT Patna
Happy Learning! 🎉