Amazon interview question

2) parse and compute a string in reverse polish notation