I have been asked this question in a job interview and I have been wondering about the right answer.
You have an array of numbers from 0 to n-1, one o
Use hashtable. Including an element in a hashtable is O(1).