Stacks and Queues
1. What is the main advantage of using a linked-list implementation of a stack over an array implementation?
2. Insertion and deletion operations in a Queue and Stack are known as respectively:
3. What is the time complexity of popping an element from a stack and dequeuing an element from a queue in standard implementations?
4. Which of the following is commonly used to implement a priority queue efficiently?
5. What happens when a pop operation is performed on an empty stack?
6. What happens when an insertion is attempted in a full fixed-size array-based queue?
7. A stack contains 10, 20, and 30 from bottom to top. If pop() is performed twice and then push(40) is performed, what is the final stack from bottom to top?
8. A queue contains 15, 25, and 35 from front to rear. After dequeue() and enqueue(45), which element is at the front?
9. Which application is most directly associated with using a stack?