slight improvement on Generate Parentheses