Tech Mahindra interview question

Find duplicate elements in an array using Streams