Barclays interview question

Implement a parenthesis, bracket and brace validator.