Ask Question

What is infix, prefix and postfixexpressions in data structures?

+5
Answers (1)
  1. 2 February, 12:15
    0
    Infix notation: A+B

    Operators are written in-between their operands. Expression X * (Y + Z) / P is means: "First add Y and Z together, then multiply the result by X, then divide by P to give the final answer."

    Postfix notation : A B +

    Operands are written before their operators. Expression given above is equivalent to X Y Z + * P /

    Operators evaluation is always left-to-right, we will not consider brackets for the order.

    Prefix notation : + A B

    Operands are written after their operators. Expression given above is equivalent to / * X + Y Z P

    Operators evaluation is always right-to-left, we will not consider brackets for the order.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is infix, prefix and postfixexpressions in data structures? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers