chavi362 / Queue-by-stack

This project implements a queue using a stack (specifically, MyStack) by inheriting from a Queue base class and overriding its functions to support enqueue, dequeue, front, and isEmpty operations efficiently.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queue-by-stack

This project implements a queue using a stack (specifically, MyStack) by inheriting from a Queue base class and overriding its functions to support enqueue, dequeue, front, and isEmpty operations efficiently.

Features

Efficient Operations: Queue operations (enqueue, dequeue, front, isEmpty) are implemented using a stack (MyStack) to achieve O(1) time complexity for most operations.

Inheritance: The QueueStack class inherits from a base Queue class, providing a modular and extensible design.

About

This project implements a queue using a stack (specifically, MyStack) by inheriting from a Queue base class and overriding its functions to support enqueue, dequeue, front, and isEmpty operations efficiently.


Languages

Language:C++ 100.0%