remove duplicates in array gives wrong result

Printable View