Search⌘ K
AI Features

Longest Subarray of 1's After Deleting One Element

Longest Subarray of 1's After Deleting One Element asks you to remove exactly one value from a binary array, then return the longest non-empty run of ones left, or zero if none exists.

Statement

Given a binary array nums, remove exactly one element from it. Return the length of the longest non-empty subarray consisting entirely of 11's in the resulting array. If no such subarray exists, return 00 ...