1248. Count Number of Nice Subarrays
https://leetcode.com/problems/count-number-of-nice-subarrays
Description
Given an array of integers nums
and an integer k
. A continuous subarray is called nice if there are k
odd numbers on it.
Return the number of nice sub-arrays.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= nums.length <= 50000
1 <= nums[i] <= 10^5
1 <= k <= nums.length
ac
Last updated