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 5%
voytxt
#2
56 c.
Top 16%
CorentinTh
Natanaelel
#3
61 c.
Top 21%
500error
#4
62 c.
Top 26%
cers
#5
69 c.
Top 37%
KrausRaus
Thomasdcrt
#6
70 c.
Top 42%
SephQ
#7
71 c.
Top 47%
Benio
#8
74 c.
Top 53%
maximec-indy
#9
75 c.
Top 58%
Eliott
#10
79 c.
Top 63%
Seboran
#11
82 c.
Top 68%
alexisab
#12
83 c.
Top 74%
justinsullard
#13
84 c.
Top 79%
Mif712
#14
86 c.
Top 84%
TooBusyForYou
#15
93 c.
Top 89%
madeforlosers
#16
108 c.
Top 95%
ComputerKWasTaken
#17
325 c.
Top 100%
jules