Generate Parentheses

#22
Medium
Stack
O(4^n / √n)
O(4^n / √n)
Amazon
Microsoft
Facebook
Google
View on LeetCode

Problem Description

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