Amazon Interview Question
Software Engineer / Developersmake use of shuntington algorithm.
you see a operand you pass it to output.
you see a operator:
check the priority of operator on top of stack:
if higher priority push it to the stack
else (lower or equal priority) pop the operators until the one with lower priority is found
repeat till the end of the infix expression.
- m@}{ March 30, 2011