Tap here to switch tabs
Problem
Submissions

Problem: Longer Contiguous Segments of Ones than Zeros

med
30 min
Try to solve the Longer Contiguous Segments of Ones than Zeros problem.

Statement

Given a binary string s, return true if the longest contiguous segment of 11s is strictly longer than the longest contiguous segment of 00s in s, or return false otherwise.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s[i] is either '0' or '1'.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longer Contiguous Segments of Ones than Zeros

med
30 min
Try to solve the Longer Contiguous Segments of Ones than Zeros problem.

Statement

Given a binary string s, return true if the longest contiguous segment of 11s is strictly longer than the longest contiguous segment of 00s in s, or return false otherwise.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s[i] is either '0' or '1'.