Please HELP ! Can Anyone tell whats wrong with this approach for MINOPS

FOR MINOPS I created arraylist(Vector) in which i added indexes of the of mismatching characters i created PriorityQue of MinHeap in which i added difference of indexes of consequtive mismatching-1

Now What i have done min answer is k*l where k and initially number of mismatching characters
and iterate over k times till k=1;
now everytime
decrease k by 1 while increase l = l+Heap.poll();
and find product if its <min
please help