Meta Interview Question

Balance parenthesis type problem