Accenture Interview Question

Create a function that checks for balanced brackets.