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 19%
Natanaelel
CorentinTh
#3
62 c.
Top 25%
cers
#4
69 c.
Top 38%
KrausRaus
Thomasdcrt
#5
71 c.
Top 44%
Benio
#6
74 c.
Top 50%
maximec-indy
#7
75 c.
Top 56%
Eliott
#8
79 c.
Top 63%
Seboran
#9
82 c.
Top 69%
alexisab
#10
83 c.
Top 75%
justinsullard
#11
86 c.
Top 81%
TooBusyForYou
#12
93 c.
Top 88%
madeforlosers
#13
108 c.
Top 94%
ComputerKWasTaken
#14
325 c.
Top 100%
jules