You shouldn't iterate through an array and remove from it at the same time, even if doing it from the end works.
well i guess you can't be blamed. the tests don't enforce immutability.
Yes, it was pretty straightforward.
Probably the shortest solution ;)
I did not come up with this n function. It is really clever.
Ahh! We have the same solution.