Amazon Interview Question

Valid Parentheses; use queue properly