Question bank › Stack
Dsa Stack Warm-up

The Reverse Calculator

You are given a mathematical expression in Postfix notation (Reverse Polish Notation) containing only non-negative integers and two operators: '+' and '-'. In Postfix, the operator follows its operands (e.g., '3 4 +' means 3 + 4). Process the expression and print the final result. You can assume the expression provided is always valid. Example: Input: 10 5 - 3 + Output: 8

Key concepts

stackarithmetic

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.