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 9%
voytxt
#2
56 c.
Top 18%
CorentinTh
#3
62 c.
Top 27%
cers
#4
69 c.
Top 36%
Thomasdcrt
#5
71 c.
Top 45%
Benio
#6
74 c.
Top 55%
maximec-indy
#7
75 c.
Top 64%
Eliott
#8
79 c.
Top 73%
Seboran
#9
82 c.
Top 82%
alexisab
#10
86 c.
Top 91%
TooBusyForYou
#11
108 c.
Top 100%
ComputerKWasTaken