Feuermagier/autograder

Remove `subList` check or make it smarter

Luro02 opened this issue · 1 comments

Description

The current implementation isn't any better than using a for-loop. Maybe only suggest this as an extension to .addAll? Like here:

for (int i = start; i < end; i++) {
  result.add(list.get(i));
}
// -> replace with result.addAll(list.subList(start, end));

One use for sublist is when one can replace the entire loop with a single subList expression