/AMC-PostfixNotation

AMC Bridge preinterview task

Primary LanguageJavaMIT LicenseMIT

AMC-PostfixNotation

AMC Bridge preinterview task

Basic postfix notation calculating principle

Language: Java 8 Created: 01.12.2021

Input

Quantity of the members in the sequence, a positive integer. Members of the sequence, integers, where:

-1 – code for *.
-2 – code for +.
-3 – code for -. Positive integers are the operands.

Output

An integer, the result of the given expression.