add removeDuplicates array algorithm