Capital One interview question

Given a string, implement a function to determine if it has matching/balanced brackets.