Infosys Interview Question

How many duplicate numbers are there in the given array?

Interview Answer

Anonymous

Feb 1, 2023

I have made a Hash map and taken the frequencies of the element and then I have checked the elements whose frequency is more than 2 and returned them as duplicate numbers in the given array