Given two sets of elements, find the sum of all distinct elements from the set. In other words, find the sum of all elements which are present in either of the given set. Example: Set 1 : [3, 1, 7, 9], Set 2: [2, 4, 1, 9, 3] Output: 13 (distinct elements 4, 7, 2 ) Give two Solutions to this problem, using different types of data structures each time. Now, given two sets of integers, write also two algorithms to print the sum of overlapping elements in two sets. The elements in each set are unique or there are no duplicates within a set.
-
Notifications
You must be signed in to change notification settings - Fork 0
Omobayode6/algorithm2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published