Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 341 Bytes

File metadata and controls

14 lines (10 loc) · 341 Bytes

Problem 6: The Bracket Generator (Generate Parentheses)

Problem Statement

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

Input Format

  • An integer n.

Constraints

  • 1 <= n <= 8

Example

Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]