This repository contains a complete implementation of a Circular Queue in Java using an array. The implementation demonstrates how to efficiently reuse memory using wraparound logic with modulo arithmetic.
enqueue(int data)β Insert element at the reardeQueue()β Remove element from the frontisEmpty()β Check if the queue is emptyisFull()β Check if the queue is fullprint()β Print all elements in the correct order
This project is part of my DSA (Data Structures & Algorithms) practice. It helped reinforce:
- Modular indexing in circular data structures
- Front and rear pointer management
- Handling edge cases (e.g., full and empty states)
- Avoiding memory waste in fixed-size queues
circularQueueβ Class with all operationsmain()β Test logic and sample usage inside the class for simplicity
- Java
- IDE: IntelliJ IDEA
Noor Fatima
BS Artificial Intelligence Student
GitHub: https://github.com/noor05-creator