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 4%
voytxt
#2
56 c.
Top 21%
DigiZoli
adh98
helbling
Natanaelel
CorentinTh
#3
57 c.
Top 25%
MaelkMark
#4
58 c.
Top 32%
Salutations45
Ryan
#5
61 c.
Top 36%
500error
#6
62 c.
Top 43%
cers
Lv0Sys
#7
69 c.
Top 54%
KrausRaus
Thomasdcrt
c
#8
70 c.
Top 57%
SephQ
#9
71 c.
Top 61%
Benio
#10
74 c.
Top 64%
maximec-indy
#11
75 c.
Top 68%
Eliott
#12
79 c.
Top 71%
Seboran
#13
82 c.
Top 75%
alexisab
#14
83 c.
Top 79%
justinsullard
#15
84 c.
Top 86%
thaispalmer
Mif712
#16
86 c.
Top 89%
TooBusyForYou
#17
93 c.
Top 93%
madeforlosers
#18
108 c.
Top 96%
ComputerKWasTaken
#19
325 c.
Top 100%
jules