FastPrepEvaluate Reverse Polish Notation
Problems/Evaluate Reverse Polish Notation

Evaluate Reverse Polish Notation

Atlassian logoAtlassian● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Atlassian full-time online assessment. The report links to the exact Evaluate Reverse Polish Notation exercise but does not copy its full statement. Our version follows that linked exercise and uses a fixed function interface.

Evaluate an arithmetic expression in Reverse Polish Notation. Each operator consumes the two preceding values, and integer division truncates toward zero.

Function

evalRPN(tokens: String[]) → int

Examples

Example 1

tokens = ["2","1","+","3","*"]return = 9

Add 2 and 1, then multiply the result by 3.

Constraints

  • 1 <= tokens.length <= 10000
  • Tokens are integers or one of +, -, *, /.
  • The expression is valid and no division uses zero.

More Atlassian Online Assessment questions

  • Planning ProductionOA · Seen Feb 2025
  • K-Means ClusteringOA · Seen Feb 2025
  • Minimum Sorted Erasure OperationsOA · Seen Jun 2024
  • Count Analogous ArraysOA · Seen Mar 2024
  • Get Maximum ScoreOA · Seen Mar 2024
  • Better Compression 🦀OA · Seen Mar 2024
  • Romanizer 🐡OA · Seen Mar 2024
  • Flower Bouquets 💐OA · Seen Mar 2024
  • Binary Search Tree IteratorOA · Seen Nov 2023
  • Binary Tree Level Order TraversalOA · Seen Nov 2023

Similar questions at other companies

  • Evaluate Reverse Polish NotationCoalition · PHONE SCREEN
  • Find the Value of a Postfix ExpressionExpedia · ONSITE INTERVIEWExpedia interview questions
  • Basic Calculator IITypeSafe AI · OA
  • Last Object to Fall Off the TableConfluent · OAConfluent interview questions
  • Minimum Rounds to Complete All TasksInfosys · OAInfosys interview questions
  • Capping Portfolio WeightsCapstone Investment Advisors · OA
  • Count Subarrays with a Perfect-Square ProductMicrosoft · OAMicrosoft interview questions
  • Repeated Mirror XORMathWorks · OAMathWorks interview questions
  • Stacked Item and Category DiscountsPalantir · OAPalantir interview questions
  • Compress Editor Actions into Operational Transform OperationsReplit · OA · PHONE SCREEN · ONSITE INTERVIEW

Atlassian interview experiences

  • Atlassian MLE Phone Screen: Model Deployment Design: 1 Experience
  • Atlassian Coding Screens and Karat: 3 Experiences (Part 2 of 2)
  • Atlassian Full Stack Interviews: 11 Experiences (Part 1 of 2)
All Atlassian interview questionsSee Atlassian hiring insights
Saved
class Solution {
    public int evalRPN(String[] tokens) {
      // Write your code here.
    }

}
Checking account…