# Find the number of parenthesis combinations [duplicate]

For example, given 3 sets of parenthesis, you have:

()()()
((()))
()(())
(())()
(()())


= 5 possible combinations.

Challenge

Program must:

• Take 1 number as an input

• Return one output, the number of possible combinations of parenthesis sets

Shortest number of bytes wins

• Welcome to Code Golf and nice first question! For future reference, we recommend using the Sandbox to get feedback on challenge ideas before posting them to main. I'd recommend you explain what a "valid" parenthesis set is. Check out some of the questions in the balanced-string tag for some good definitions Mar 16, 2021 at 21:21
• Is this a duplicate of this challenge? Mar 16, 2021 at 21:39
• Is this a duplicate of Catalan Numbers? Mar 16, 2021 at 21:39
• Heh, ninja'd in a comment, that's another level. Mar 16, 2021 at 21:40
• @Arnauld we have a restricted version - Parentheses sequences in lexicographical order. Mar 16, 2021 at 22:13