🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Stack & Queue Quiz: all 8 questions

Stack & Queue Quiz · Question 4 of 8

In RPN, for the tokens ["5", "2", "-"], what is the result?

In RPN, for the tokens ["5", "2", "-"], what is the result?

Answer & explanation

Correct answer: 3

The first number popped (2) is the RIGHT operand: 5 − 2 = 3.

Can you get the rest right without peeking?

Take the timed Stack & Queue Quiz quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →