--> Prompts the user to enter an item to add to the queue.
--> Adds the item to the queue.
--> Removes and displays the item at the front of the queue.
--> Handles underflow error if the queue is empty.
--> Displays the current size of the queue.
--> Displays whether the queue is empty or not.
Priority Queue (using Bubble Sort)
Linear Queue
Exit
--> Prompts the user to enter an item to add to the stack.
--> Adds the item to the top of the stack.
--> Removes and displays the item from the top of the stack.
--> Handles underflow error if the stack is empty.
--> Displays whether the stack is empty or not.
--> Displays the current size of the stack.
--> Exits the program.
python script_name.py
*(Replace script_name.py with the actual name of the Python script.)
The program includes a simple menu system for user interaction.
Both the Queue and Stack classes are implemented with various methods for different operations.
The Queue class provides options to display the queue as a Priority Queue (using Bubble Sort) or as a Linear Queue.
The Stack class allows users to perform basic stack operations such as push, pop, check if it's empty, and get its size.
Feel free to explore and use this program as a reference for understanding basic data structures in Python.
This program was also created for educational purposes to assist A Level Revision for the Paper 1 AQA Exam.