# Backtrack

## Generate Parentheses

Some pruning conditions:

`left`

and`right`

represent the number of parentheses that can still be used. If at some point`left`

is greater than`right`

, it means there are more`)`

than`(`

in the track, which is invalid.- If at any point
`left`

or`right`

is less than 0, it means we have used more parentheses than allowed, which is invalid.

**Solution:**

## Numbers With Same Consecutive Differences

**Solution:**