This project provides a visual and interactive representation of Segment Trees, a powerful data structure used for range queries and updates in logarithmic time. It is designed for learning, teaching, and understanding how Segment Trees work under the hood.
- Visual construction of Segment Tree
- Step-by-step range queries and updates
- Real-time updates on tree changes
- Intuitive UI for learners
- Ideal for students, educators, and competitive programmers
A Segment Tree is a binary tree used to efficiently store information about intervals or segments. It allows querying sums, minimums, maximums, or any associative operation over a range in O(log n)
time.
Segment-Tree-Visualization/
├── index.html # Main visualization UI, Styling for tree and controls, & Core logic for tree operations and animations
├── README.md # Project overview and instructions
- Clone the repository:
git clone https://github.com/anditisyou/Segment-Tree-Visualization.git
2. Open `index.html` in your browser.
3. Input an array and start performing queries or updates!
## 🔧 Technologies Used
* HTML, CSS, JavaScript
* Canvas/SVG or DOM elements for visual tree rendering
## 🤝 Contributing
Contributions are welcome! Feel free to fork this repo, submit issues, or pull requests to improve the visualizer.
## 📘 License
This project is licensed under the [MIT License](LICENSE).
---