This operation is actually O(n), since you run through the list looking for the value, and it means you won't add duplicates to the list.