Marks :10
: 4 | : 0
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.
Constraints : 1 <= nums.length <= 50000 1 <= nums[i] <= 10^5 1 <= k <= nums.length
The first line contains two integers : n and k The next line contains n space separated integers denoting the array.
An integer denoting the number of nice subarrays.
5 2 1 2 3 4 5
4
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.