arrow_back Back to Challenges

#22 Generate Parentheses

Medium Acceptance 0%
description

Problem Description

Given `n` pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

checklist Constraints

1 <= n <= 8

science Examples

Case #1

In: n = 3
Out: ["((()))","(()())","(())()","()(())","()()()"]

Case #2

In: n = 1
Out: ["()"]

Mastery Tags

Backtracking Dynamic Programming Strings

Hiring Companies

Amazon Google Microsoft
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude