None at all
Given an array of integers a1,a2…an, check whether there is a subarray which consists of exactly k even integers.
Since n<=50, you can traverse over all subarrays and count how many even numbers are there in each substring. Complexity: O(N3).
Or, we can do this cleverly. If there are atleast k even numbers in the whole array, we can always pick a subarray which will contain k even numbers.
One tricky case would be k=0, and all numbers are even in the array. In this case we can’t pick any subarray.