Tap here to switch tabs
Problem
Submissions

Problem: Generate Binary Strings Without Adjacent Zeros

med
30 min
Try to solve the Generate Binary Strings Without Adjacent Zeros problem.

Statement

Given a positive integer n, return all binary strings of length n such that no two adjacent characters are equal to ′0′'0'.

The resulting strings may be returned in any order.

Constraints:

  • 1≤1 \leq n ≤18\leq 18

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Generate Binary Strings Without Adjacent Zeros

med
30 min
Try to solve the Generate Binary Strings Without Adjacent Zeros problem.

Statement

Given a positive integer n, return all binary strings of length n such that no two adjacent characters are equal to ′0′'0'.

The resulting strings may be returned in any order.

Constraints:

  • 1≤1 \leq n ≤18\leq 18