Back to all patterns

Backtracking / Stack

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Backtracking / Stack pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (1)

Generate Parentheses

Generate all combinations of well-formed parentheses with n pairs.

Key Signals:

Build valid stringsTrack open/close countRecursive generation