MAERSK Interview Question

Find the duplicates from an array