Algo to find duplicates in a very large array
You can do it in O(nlog(n)):

Sort the array
find the duplicates (they will be next to each other) in one pass.

I think that is what the interviewer wanted to hear.
if you did a merge sort or a quick sort, finding the duplicates could be done at merging in hidden time.
These can be implemented "in-place", or "by-part" if the array is too large to fit in memory.
During one of technical interview got this question.
I know way to solve this problem using (in java) HashSet.
But i could not understand when interviewer forced on the word "a very large array let's say 10 million elements in the given array".
Do i need to change the approach? If not, what should be the efficient to achieve this?
PS: Algo or implementation is language agnostic. 
Thank you.