Amazon interview question

!. Write a program to validate a given arithmetic expression..