remove single element with no duplicates in array, complexity O(n) OK