Pergunta de entrevista da empresa Leeco

Given a set of parenthesis e.g ({[]) Write a code to determine whether it was balanced or not.