DevRev interview question

Q: Check if the given expression is a valid parenthesis.