Amazon interview question

Arithmetic expressions tree constructing validating paraing calculating