MAERSK interview question

Find the duplicates from an array