Practice · 5 of 5
Debug the removal
CHALLENGE
Difficulty: beginner+25 XP
removeAll should delete every occurrence of target, but some targets survive. Explain-why-then-fix: the forward loop skips shifted elements. Rewrite with a correct pattern.
Press Submit to check your solution.
Back to lesson: Practice: List practice