in reply to remove duplicates from array
If 0 is the first element in the array, modulus omits it from the results. If the array starts with a negative integer and contains 0, modulus tries to divide by zero and dies horribly.
These solutions could be fixed with some extra conditionals, but I think the other solutions are better.
|
|---|