Intersection Sum

Sum the intersection of two integer arrays.

Easy5/19/2024

Problem statement

Given two integer arrays, return the sum of the intersection of both arrays.

Note:

  • the integers can be negative
  • arrays can have duplicates
  • the intersection can be empty
  • the arrays can be of different lengths

Problem leaderboard

#
Size
%
Users
#1
47 c.
Top 7%
voytxt
#2
56 c.
Top 20%
CorentinTh
Natanaelel
#3
62 c.
Top 27%
cers
#4
69 c.
Top 33%
Thomasdcrt
#5
71 c.
Top 40%
Benio
#6
74 c.
Top 47%
maximec-indy
#7
75 c.
Top 53%
Eliott
#8
79 c.
Top 60%
Seboran
#9
82 c.
Top 67%
alexisab
#10
83 c.
Top 73%
justinsullard
#11
86 c.
Top 80%
TooBusyForYou
#12
96 c.
Top 87%
madeforlosers
#13
108 c.
Top 93%
ComputerKWasTaken
#14
325 c.
Top 100%
jules