We are given an array A of positive integers, and two positive integers L and R (L <= R). Return the number of (contiguous, non-empty ...
Given an array of integersnumsand an integerk. A continuous subarray is calledniceif there arekodd numbers on it. Returnthe number ofnicesub arrays. Example : Example : Example : Constraints: lt nums ...
2021-10-31 09:42 0 206 推荐指数:
We are given an array A of positive integers, and two positive integers L and R (L <= R). Return the number of (contiguous, non-empty ...
We have an array `A` of non-negative integers. For every (contiguous) subarray B = [A[i], A[i+1], ...
Given an array A of positive integers, call a (contiguous, not necessarily distinct) subarray of A good if the number of different integers ...
In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we want ...
In an array A of 0s and 1s, how many non-empty subarrays have sum S? Example 1: Note: A.length <= 30000 0 <= S <= A.length A[i ...
A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have ...
Given an array of positive integers target and an array initial of same size with all zeros. Return the minimum number of operations to form ...
Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L ...