예제 #1
0
 private void remove(
     Sorted<Integer> sorted, int startIndex, int nrIterations, int[] itemsToRemove) {
   for (int i = startIndex; i < startIndex + nrIterations; i++) {
     sleep();
     sorted.remove(itemsToRemove[i]);
   }
 }
예제 #2
0
 private void add(Sorted<Integer> sorted, int startIndex, int nrIterations, int[] itemsToAdd) {
   for (int i = startIndex; i < startIndex + nrIterations; i++) {
     sleep();
     sorted.add(itemsToAdd[i]);
   }
 }