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 16%
Natanaelel
adh98
CorentinTh
#3
58 c.
Top 24%
Salutations45
Ryan
#4
61 c.
Top 28%
500error
#5
62 c.
Top 36%
cers
Lv0Sys
#6
69 c.
Top 48%
Thomasdcrt
KrausRaus
c
#7
70 c.
Top 52%
SephQ
#8
71 c.
Top 56%
Benio
#9
74 c.
Top 60%
maximec-indy
#10
75 c.
Top 64%
Eliott
#11
79 c.
Top 68%
Seboran
#12
82 c.
Top 72%
alexisab
#13
83 c.
Top 76%
justinsullard
#14
84 c.
Top 84%
Mif712
thaispalmer
#15
86 c.
Top 88%
TooBusyForYou
#16
93 c.
Top 92%
madeforlosers
#17
108 c.
Top 96%
ComputerKWasTaken
#18
325 c.
Top 100%
jules