Open
Description
ignore[w] = e.length - k +(w+1); is wrong
When Object arr[] = {12, 8, 11, 13, 10, 15, 14, 16, 20};
k=4, the result is wrong.
May be change into
ignore[w] = combination.length +(w);
The shifting ignored indices part has some bug. I also change it into
while(w>0){
if(w > 0){
ignore[w-1] = ignore[w]-1;
System.out.println(" **ignore[w-1]= "+ (ignore[w]-1));;
}
w--;
}
Metadata
Metadata
Assignees
Labels
No labels