Problem
Submissions

Problem: Max Consecutive Ones

Statement

You are given a binary array nums (an array that contains only 00s and 11s). Your task is to find the maximum number of consecutive 11s in the array and return it.

Constraints

  • 11 \leq nums.length 103\leq 10^3

  • nums[i] is either 00 or 11.

Problem
Submissions

Problem: Max Consecutive Ones

Statement

You are given a binary array nums (an array that contains only 00s and 11s). Your task is to find the maximum number of consecutive 11s in the array and return it.

Constraints

  • 11 \leq nums.length 103\leq 10^3

  • nums[i] is either 00 or 11.