An interactive web application for learning and visualizing data structures and algorithms including trees, graphs, and more.
- Binary Search Tree (BST) construction and visualization
- AVL Tree with automatic balancing and rotation visualization
- Support for LL, RR, LR, RL rotations
- Balance factor display
- Tree validation (check if valid BST/AVL)
- Preorder traversal (Root → Left → Right)
- Inorder traversal (Left → Root → Right)
- Postorder traversal (Left → Right → Root)
- Level-order traversal (BFS on tree)
- Step-by-step animation with result display
- Depth-First Search with stack visualization
- Breadth-First Search with queue visualization
- Custom graph input (adjacency list)
- Directed and undirected graph support
- Interactive node/edge visualization
- All-pairs shortest path computation
- Step-by-step matrix transformation
- Path reconstruction between any two nodes
- Cycle detection
- Interactive adjacency matrix editor
- Build Huffman tree from symbol frequencies
- Generate optimal prefix-free codes
- Visualize tree construction step-by-step
- Code table with average length calculation
- Frontend: React 18 + TypeScript
- Build Tool: Vite
- Styling: CSS with custom properties
- Routing: React Router DOM
- Visualization: SVG
- Node.js 18+
- npm or yarn
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewThis project is configured for deployment on Vercel:
- Push to GitHub
- Connect repository to Vercel
- Deploy automatically
Or deploy manually:
npm run build
# Upload dist/ folder to your hostingsrc/
├── algorithms/ # Algorithm implementations
│ ├── treeAlgorithms.ts # BST, AVL, traversals
│ ├── graphAlgorithms.ts # DFS, BFS
│ ├── floydAlgorithm.ts # Floyd-Warshall
│ └── huffmanAlgorithm.ts # Huffman coding
├── components/ # Reusable UI components
│ └── Layout.tsx # Main layout with navigation
├── pages/ # Page components
│ ├── Home.tsx # Landing page
│ ├── TreeVisualizer.tsx # Tree/BST/AVL page
│ ├── GraphVisualizer.tsx # DFS/BFS page
│ ├── FloydVisualizer.tsx # Floyd-Warshall page
│ └── HuffmanVisualizer.tsx # Huffman coding page
├── types/ # TypeScript type definitions
│ └── index.ts
├── App.tsx # Main app component
├── main.tsx # Entry point
└── index.css # Global styles
- Root, children, leaves, height, levels, paths
- Binary tree structure
- Static and dynamic representations
- Ordering property: left < root < right
- Search, insert, delete operations
- Time complexity analysis
- Balance factor: height(left) - height(right)
- Rotations: LL, RR, LR, RL
- Self-balancing after insertions
- DFS: Stack-based, explores depth first
- BFS: Queue-based, explores level by level
- Applications in path finding and connectivity
- All-pairs shortest paths
- Dynamic programming approach
- O(n³) time complexity
- Path reconstruction using predecessor matrix
- Optimal prefix-free codes
- Greedy algorithm
- Data compression application
- Average code length calculation
MIT
