Professional Documents
Culture Documents
DS T VIVA Mid Moinul
DS T VIVA Mid Moinul
DS T VIVA Mid Moinul
pop removes the last (top of the stack) element that was added.
2) A Queue: is a FIFO (First In First Out) data structure where the element
that is added first will be deleted first.
b) In stacks only one pointer is used. It points to the top of the stack.
In queues, two different pointers are used for front and rear ends.
POSTFIX: Also Known as Reverse Polish Notation (RPN). The operator comes after
the operands, i.e. operator comes post of the operands, so the name postfix. e.g. xy+,
xyz+* etc. (i++)
PREFIX: Also Known as Polish notation. The operator comes before the operands,
i.e. operator comes pre of the operands, so the name prefix. e.g. +xy, *+xyz etc. (i++)
8) INFIX to PREFIX:
Symbol stack prefix
সব কিছুই serially Operator & Rules apply করার আগে শুধু Operand গুলা যাবে,,
থাকবে Bracket আর, Rules apply করার পরে Operator গুলা যাবে
থাকবে
rule-1: bracket er vitore Jodi + or * ashe tahale popout hoye jay.
Rule-2: Jodi same priority r operator duita eksathe thakhe tahle tara eksathe takhte parbe
jotokhon porjonto onno operator na ashe.
Rule-3: age kono operator Jodi takhe ebong seitar priority Jodi notun jei operator ashbe eitr
tekhe beshi hoy tahle jara age tekhe chilo tara keu r takhbe na..
A) Associativity: hocche left to right..mane jeta age ashbe setr e kaj hbe
age (left to right).
Associativity defines the order in which operators of the same precedence are evaluated
in an expression. Operators that appear in the same group have the same precedence
b)
c)
d)
e)
f)