Jack Spade Interview Question

Finding duplicates in an array