You are given an array A containing N integers. You are also given an integer K. An array is good if A[i]<=A[i + k], i = 1, 2, 3,.., n - k In one operation, you can choose any element and convert it to an arbitrary integer.
Task
Determine the minimum number of operations to make the array good. Note: Assume 1-based indexing.
Sample Input : [2,4,1,3] , k =2
Sample Output : 2