CTCI 9.6 generate parenthesis