Leetcode 22 | Generate Parentheses ( Java Solution | asked in Goldman Sachs recently)

preview_player
Показать описание
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses

#thetechgranth #leetcode #generateParentheses

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

Рекомендации по теме
Комментарии
Автор

I understood first answer but how other brackets are getting created. Not clear.

PoojaSharma
Автор

Why i am unable to carry the concept long period of times bcz I forget the the concept short period of times need ur suggestions

pratapjavasingh
Автор

sir to be honest you need to focus on how deliver DRY RUN ...rest is perfect.

sakshigupta
visit shbcf.ru