remove duplicates from unsorted array c