7 Alog
7 Alog
Check if Full: The queue is full if size equals the maximum size of the array
(MAX).
Enqueue Operation:
Iterate through the queue from front to rear and print each element.
Pushed 10
Pushed 20
Pushed 30
Stack after pushes:
30
20
10
Top element: 30
Popped element: 30
Popped element: 20
Stack after pops:
10