Skip to content

yashi2003/stack-queue-visualization

Repository files navigation

📚 Stack & Queue Visualization

An interactive visualization tool to understand Stack and Queue data structures through animations and step-by-step operations.

Java HTML5 CSS3 JavaScript

🌟 Features

  • Visual Representation: See how stacks and queues work in real-time
  • Interactive Operations: Push, Pop, Enqueue, Dequeue with smooth animations
  • Step-by-Step Execution: Understand each operation as it happens
  • Clean UI: Simple and intuitive interface for learning
  • Educational Tool: Perfect for students learning data structures

🚀 Demo

https://stack-queue-visualization.onrender.com/

🔗 https://stack-queue-visualization.onrender.com/

📸 Screenshots

Screenshot 2025-12-07 at 3 45 51 PM

🛠️ Tech Stack

  • Backend: Java
  • Frontend: HTML, CSS, JavaScript
  • Build Tool: Gradle

📋 Prerequisites

Before running this project, make sure you have:

  • Java Development Kit (JDK) 11 or higher
  • Gradle (or use the included Gradle wrapper)

⚙️ Installation

  1. Clone the repository

    git clone https://github.com/yashi2003/stack-queue-visualization.git
    cd stack-queue-visualization
  2. Build the project

    ./gradlew build

    Or on Windows:

    gradlew.bat build
  3. Run the application

    ./gradlew run
  4. Open in browser

    Navigate to: http://localhost:8080
    

💡 Usage

Stack Operations

  • Push: Add an element to the top of the stack
  • Pop: Remove the top element from the stack
  • Peek: View the top element without removing it
  • Display: Show all elements in the stack

Queue Operations

  • Enqueue: Add an element to the rear of the queue
  • Dequeue: Remove an element from the front of the queue
  • Front: View the front element without removing it
  • Display: Show all elements in the queue

📂 Project Structure

stack-queue-visualization/
│
├── src/
│   ├── main/
│   │   ├── java/           # Java source files
│   │   └── resources/      # Static resources
│   │       ├── static/     # CSS, JS files
│   │       └── templates/  # HTML files
│   │
│   └── test/               # Test files
│
├── gradle/                 # Gradle wrapper files
├── build.gradle.kts        # Gradle build configuration
├── settings.gradle.kts     # Gradle settings
└── README.md              # Project documentation

🎯 Learning Objectives

This project helps you understand:

  • LIFO (Last In First Out): Stack behavior
  • FIFO (First In First Out): Queue behavior
  • Time complexity of operations
  • Practical applications of these data structures
  • Visual debugging techniques

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🐛 Issues

Found a bug? Have a suggestion? Please open an issue here.

📝 License

This project is open source and available under the MIT License.

👤 Author

Yashi

🌟 Show your support

Give a ⭐️ if this project helped you understand data structures better!

📚 Resources


Made with ❤️ for learning data structures