Search
⌘K

Leetcode 1493. Longest Subarray of 1's After Deleting One Element

Given a binary array, delete exactly one element and return the length of the longest contiguous subarray of 1s in the resulting array (0 if none); this is typically solved by a sliding-window/two-pointer approach that allows at most one zero inside the window (n up to 1e5).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.