WePay interview question

Reverse Polish Notation Valid Number