DolarApp interview question

Implement reverse polish notation production code.