Morgan Stanley Interview Question

Valid Parentheses medium and project questions.