Page 1 - Data Structure-Stacks and Queues
P. 1

Computer Science

                                                     Class - XII

                         Chapter – Data Structure – Stacks & Queues




               1.  What is stack? What basic operations can be performed on stack.
               2.  Enlist some applications of stack.
               3.  What are queues? What all basic operations can be performed on queue.
               4.  Enlist some applications of queue.
               5.  Describe similarities and differences between queues and stacks.
               6.  What is the situation called when an insertion is attempted in a stack/queue full?
               7.  What is the situation called when a read/deletion is attempted in an empty
                   stack/queue?
               8.  Write PUSH(Names) and POP(Names) methods in Python to add Names and remove
                   Names considering them to act as PUSH and POP operations in Stack.
               9.  Write a function in Python, INSERTQ(Arr,data) and DELETEQ(Arr) for performing

                   insertion and deletion operations in a Queue.  Arr is the list used for implementing
                   queue and data is the value to be inserted.
               10. Write a program to implement a Stack for the book-details (book no, book name) in
                   Python. That is, now each item node of the Stack contains two types of information – a
                   book no and its name.
               11. Write a program to perform insert and delete operations on a Queue containing
                   Members’ details as given in the following definition of itemnode:
                       Member No        integer

                       Member String  String
                       Age              Integer
   1