Tripadvisor Interview Question

Given a string, determine if brackets are matched.