Create a program that takes as input an integer n, and outputs all possible combinations of matching opening/closing parentheses of count n.
example: n=3
((()))
(())()
(()())
()()()
I think It is still wrong:
axel@axel-VirtualBox:~$ java MatchingBraces 4
The result is: [(((()))), ()((())), (()(())), ()()(()), ((()())), ()(()()), (()()()), ()()()()]
for input 4 I don't see this case:
(()) (())
Create a program that takes as input an integer n, and outputs all possible combinations of matching opening/closing parentheses of count n. example: n=3 ((())) (())() (()()) ()()()