PROPERTIES OF STACK...
There are following important properties of stack-
(i) All insertions and deletions can occur only at the top of stack.
(ii) The elements that are removed from stack in reverse order in
which they were inserted.
(iii) Only one element can be pushed or popped from the stack at a
time.
(iv) It works in last-in-first-out or LIFO manner.
PROPERTIES OF QUEUE...
Queue can be considered as aline of items which has following
essential properties-
(i) It has two ends that are front and rear.
(ii) Addition of new item can only be done at rear.
(iii) Deletion of an item can only be done from front end.
(iv) The item which is added first will be deleted first. Hence, the
structure is frequently called 'FIFO'.
(v) Only one item can be added at a time.
(vi) Only one item can be deleted at a time.
(vii) No element other than front and rear elements are visible.
ADVANTAGES OF POLISH NOTATION...
(i) Polish notation allows us to write expressions without need for
parenthesis. For instance, the expression a * (b + c) in polish
notation would be * a + b c while a * b + c is + * a b c.
(ii) Polish notation is easier to evaluate in a computer.
(iii) Because polish notation requires no parenthesis so it saves
memory and efforts.
(iv) We all are well familiar with prefix expressions.
(v) Another advantage of polish notation over ordinary arithmetic
notation is that in polish notation there is no need for parenthesis,
associativity or operator precedence. In polish notation, every
operator always operates on the one or two operands immediately
following it. In reverse polish, it operates on the operands
immediately preceding the operator.
DISADVANTAGES OF LINKED STACK OVER LINEAR
STACK...
(i) The linear relationship between the data elements of a linear stack
is reflected by the physical relationship of the data in memory, not by
any information contained in the data elements themselves. This
makes it easy to compute the address of an element in an array.
(ii) If the number of fields are more, then more memory space is
needed in case of linked stack.
(iii) Access to an arbitrary data item is little bit cumbersome and time
consuming.