Meta Interview Question

Valid Parentheses and tree traversal