Hi,
Let's say I have an array. Every time I want to input an element, I want to make sure there is no duplicate entry in the array/list.
I think the simplest method is doing a linear search against the array everytime I input the value. However, if the list grows longer, this method will not be efficient.
How to avoid duplicate entry to a list/array in an effective manner?