1493. Longest Subarray of 1's After Deleting One Element
Longest Subarray of 1's After Deleting One Element - LeetCode 주어진 이진 배열 nums에서 하나의 요소를 삭제한 후, 결과 배열에서 연속된 1로만 이루어진 가장 긴 부분 배열의 길이를 찾으며, 이 부분 배열이 없으면 0을 반환해야 합니다. Given a binary array nums, you should delete one element from it. Return the size of the longest non-empty subarray containing only 1's in the resulting array. Return 0 if there is no such subarray. Example 1: Input: nums = [1,1,0,1] Ou..
LeetCode
2023. 11. 6. 23:41