Java icon indicating copy to clipboard operation
Java copied to clipboard

shifting.java bug

Open andytang2008 opened this issue 2 years ago • 2 comments

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--; }

andytang2008 avatar Aug 24 '22 18:08 andytang2008

来件已收到,我会尽快回复

huangfuyixiao avatar Aug 24 '22 18:08 huangfuyixiao

Could you share Readme or documentation file?

Khomendra avatar Oct 07 '23 11:10 Khomendra