|
|
|
|
|
by bartonfink
5620 days ago
|
|
You can do even better by inserting each element from the array into a hashtable and either discarding or doing a deep compare on collisions. Ignoring the probability of collisions, this is O(n) at the cost of extra space. |
|