MaxLinear Interview Question

Finding the duplicates in an array