#1493 - Longest Subarray of 1's After Deleting One Element
Given a binary array nums, return the size of the longest non-empty subarray containing only 1's in the resulting array after deleting exactly one element. Return 0 if there is no such subarray.
| Input | Output |
|---|---|
nums = [1,1,0,1,1,1,0,1] | 5 |
nums = [0,1,1,1,0,1,1,0,1] | 5 |
nums = [1,1,1] | 2 |