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 6%
voytxt
#2
56 c.
Top 17%
CorentinTh
Natanaelel
#3
61 c.
Top 22%
500error
#4
62 c.
Top 28%
cers
#5
69 c.
Top 39%
Thomasdcrt
KrausRaus
#6
70 c.
Top 44%
SephQ
#7
71 c.
Top 50%
Benio
#8
74 c.
Top 56%
maximec-indy
#9
75 c.
Top 61%
Eliott
#10
79 c.
Top 67%
Seboran
#11
82 c.
Top 72%
alexisab
#12
83 c.
Top 78%
justinsullard
#13
86 c.
Top 83%
TooBusyForYou
#14
93 c.
Top 89%
madeforlosers
#15
108 c.
Top 94%
ComputerKWasTaken
#16
325 c.
Top 100%
jules