Skip to main content

Practice · 4 of 4

Debug: the skipping remover

CHALLENGE
Difficulty: beginner+25 XP

removeAll(list, value) should remove EVERY occurrence of value, but the forward loop skips the element right after each removal ("aab" removing 'a' leaves one 'a'). Fix it — the signature stays.

Back to lesson: Practice: Integrated reps