Sr Software Engineer Interview Questions

67,420 sr software engineer interview questions shared by candidates

* Takes a list of strings representing either operators or operands and returns * the result of a reverse-polish notation calculation on them * Sample output: * {"4", "1", "+", "2", "*"} -> ((4 + 1) * 2) -> 10 * {"5", "8", "4", "/", "+"} -> (5 + (8 / 4)) -> 7 * Supported operators are +, -, *, and / * @param ops the series of operators and operands to operate on * @return a Double equal to the result of the calculation * @throws IllegalArgumentException if ops does not represent a well-formed RPN expression * @throws ArithmeticException if the expression generates an arithmetic error, such as dividing by zero */
avatar

Senior Software Engineer

Interviewed at Amazon

3.5
Mar 9, 2017

* Takes a list of strings representing either operators or operands and returns * the result of a reverse-polish notation calculation on them * Sample output: * {"4", "1", "+", "2", "*"} -> ((4 + 1) * 2) -> 10 * {"5", "8", "4", "/", "+"} -> (5 + (8 / 4)) -> 7 * Supported operators are +, -, *, and / * @param ops the series of operators and operands to operate on * @return a Double equal to the result of the calculation * @throws IllegalArgumentException if ops does not represent a well-formed RPN expression * @throws ArithmeticException if the expression generates an arithmetic error, such as dividing by zero */

Viewing 2411 - 2420 interview questions

Glassdoor has 67,420 interview questions and reports from Sr software engineer interviews. Prepare for your interview. Get hired. Love your job.