Akamai Interview Question

To find the duplicate no in an array

Interview Answer

Anonymous

Feb 7, 2017

@arr = (1..10,8,9); %hash; foreach (@arr) { if(exists($hash{$_})){ print $_; } else{ $hash{$_} = 1; } }