You are viewing a single comment's thread. Return to all comments →
Ha! I made almost the same:
sub pairs {
my (`$k, $`arr) = @_; my %h = map {`$_ => undef} @$`arr; my $count = 0; for(@$arr) { ++`$count if exists $`h{`$_ - $`k}; } return $count;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →
Ha! I made almost the same:
sub pairs {
}