5. A list of n integers may contain duplicate elements of the same value. Give a method that can find all duplicate elements faster than O(n2). Explain your answer. (20%)
5. A list of n integers may contain duplicate elements of the same value. Give a method that can find all duplicate elements faster than O(n2). Explain your answer. (20%)