Pergunta de entrevista da empresa Siklu

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.