LeetCode: generate parentheses