SingleStore Interview Question

Find duplicates in an array in O(n) time using O(1) memory