What is the inefficient brute-force idea?
Practice this question from Evaluate Reverse Polish Notation - Stack evaluation Pattern Practice Quiz, with options and an explanation.
Question
What is the inefficient brute-force idea?
Option A — Correct answer
Repeatedly replace two operands and an operator with a result
Option B
Use binary search
Option C
Use Kadane algorithm
Option D
Use two sorted arrays
Explanation
Repeatedly find an operator and replace the previous two operands plus operator with the result.