Evaluate Postfix Expression

PHP Hard 9 views
Back to Questions

Problem Description

Given a postfix expression with integers and ops + - * /, evaluate it using helper functions.

Input Format

One line tokens.

Output Format

One integer result.

Sample Test Case

Input:
10 3 - 2 *
Output:
14

Constraints

Token count

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next