GlobalLogic interview question

infix to postfix and prefix