Minimum cost to make every Kth element in Array equal
Given an array arr[] of integers and an integer K, the task is to find the minimum number of operations required to make every Kth element in the array equal. While performing one operation you can either increase a number by one or decrease the number by one. Examples: Input: arr[] = {1, 2, 3, 4, 4