

The first line of input contains an integer ‘T’, denoting the number of test cases. The test cases follow.
The first line contains two integers ‘N’ and ‘K’, which denotes the number of slots and the number of books that you bought from the market.
The second line contains 'N' integers denoting the elements of the array ‘ARR’.
For each test case, print 1 if all ‘K’ books can be kept under the given condition. 0 otherwise.
Print the output of each test case in a separate line.
You don't need to print anything, it has already been taken care of. Just implement the given function.
1<= T <= 50
1 <= N <= 10^4
1 <= K <= 10^4
1 <= ARR[i] <= 10^4
Where ’T’ is the number of test cases, N denotes the number of slots in the almirah, ‘K’ denotes the number of books that you bought from the market, ARR[i] denotes the element at index ‘i’.
Time Limit: 1 sec
Approach: The idea is to traverse over the array and if the adjacent slots of the current slot are empty, then put a book in the current slot. If you can successfully keep k books then return 1.
The steps are as follows: