Search⌘ K
AI Features

Max Consecutive Ones

Max Consecutive Ones asks you to examine a binary array and return the length of its longest contiguous run of ones, stopping whenever a zero appears.

Statement

You are given a binary array nums (an array that contains only ...