Augustin Smith wrote:
Hi All,
Suppose I have a list with numbers {1, 2, 3, 2, 1, 2, 4, 3, 1}.
Let these numbers be any any data structure like array/arraylist or anything.
Whats the EFFICIENT way to find out unique numbers in the list. i.e., {1, 2, 3, 4}
And the constraint is without using any built-in functions.
Can you please analyze and mention the Time complexity for the algorithm you suggest.
-Regards
The JavaRanch is not a code mill. We are not here to do you homework problems.
However, if you make an effort at doing you own work. And if you run into an issue with the attempt, then provide us with the issue that you are running into, and perhaps, we can give you a hint in the right direction.
Henry