Tripadvisor interview question

Given a string, determine if brackets are matched.