1. The 'STACK' is a ____________________ data structure.
2. In a stack data is added (or ________) at one end. It is removed (or _______) from the same end of the structure. A stack is a "last in first out" structure. The top of the stack can also be viewed by _______ at it.
3. A queue is similar to an array, but data is only added at one ____ (the tail). It is removed from the other end (the _____). A queue is a "_____" structure.
4. In order to locate the last item in the stack, a special ________ is used, called the 'stack _________'. In Python a list can act like a stack so you can manage without a _______.
5. The _____ queue is a particular kind of queue where new items are added to the ____ of the queue as items are read off the front of the queue. So there is constant stream of data flowing into and out of the queue. Another name for it is '______ buffer.
6. The following is a stack containing the names of subjects. Certain subjects are added to the stack. Can you predict the output of the pop call on line 5?
7. Can you predict the output from Line 7?
8. _________are used whenever you want to process things one at a time as they come in where as ___________ are useful for tracing back to access previous elements/operations
For example, undo operations in editors.
9. Here is a class implementation of a Stack. Can you predict the output?
10. The following functions demonstrate the working and functionality of a stack. Analyse the code and see if you can predict the output? (line 11)