Anonymous interview question

Code based on string to evaluate the infix expression.