Page 84 - DCAP605_ADVANCED_DATA_STRUCTURE_AND_ALGORITHMS
P. 84
Unit 3: Stacks
Postfi x: Notation of an arithmetic expression in which operators come after their operands. Notes
Prefi x: Notation of an arithmetic expression in which operators come before their operands.
Push: Stack operation which puts a value on the stack.
Stack: A linear data structure where insertion and deletion of elements can take place only at
one end.
3.6 Self Assessment
Choose the appropriate answers:
1. Basic method of implementation of stack are:
(a) Where the memory is used statically
(b) Where the memory is used dynamically
(c) Both of the above
(d) None of the above
2. A stack operation that removes an element from the stack
(a) Pop (b) Push
(c) LIFO (d) FIFO
3. The infix of a particular element is x + y what is the prefix of this
(a) x + y+ (b) +xy
(c) xy+ (d) None of the above
4. The hardware component known as an input device is:
(a) RAM (b) Hard-disk
(c) Monitor (d) Processor
(e) Keyboard
5. The hardware component known as an output device is:
(a) Keyboard (b) Monitor
(c) RAM (d) Hard-disk
(e) Processor
6. CPU stands for
(a) Control processing unit (b) Central processing unit
(c) Central programming unit (d) None of these
Fill in the blanks:
7. Stack is said to possess ..................................property.
8. .................................. is used to implement stacks where the memory is used statically.
9. Pointers help in .................................. implementation of stacks.
10. In .................................. the operators come before operands.
LOVELY PROFESSIONAL UNIVERSITY 79