Problems / Stack / Generate Parentheses
#24 Medium Time O(4^n/√n) Space O(n) Animated

Generate Parentheses

Generate all combinations of well-formed parentheses.

LeetCode ↗
Approach: Backtracking with Stack
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps