Contents    Page-10    Prev    Next    Page+10    Index   

What is the Reverse Polish for A - B * C + D

  • A: AB-C*D+
  • B: ABC-*D+
  • C: ABCD*-+
  • D: ABC*-D+
  • E: ABC*D+-

    Answer: D

    A B C go straight to output, stack is - *. Reduce since *+, sending * to output. Reduce again since -+, sending - to output. Then shift + to stack, output D, reduce and output +.