Google Interview Question

Find duplicate elements from an array. How about in a very large file that can't load to memory.