algorithms.tutorialhorizon.com

Find the sum of overlapping elements in two sets | Algorithms

Objective: Given two set of integers, write an algorithm to print the sum of overlapping elements in two sets. Note: Elements in each set are unique or there are no duplicates within a set. Example: Set 1: [2, 3, 1, 6] Set 2: [4, 0, 6, 7] Sum of overlapping elements: 12 Explanation: Common element is 6