Millennium interview question

They asked about Valid Parentheses.