Function to return the minimum number of operations needed to partition the array in k contiguous groups such that all elements of a given group are identical
int getMinimumOps ( vector < int > ar , int k ) {