OpenLM interview question

Valid Parentheses question. Easy to medium dsa question.