Skip to content

Omobayode6/algorithm2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

sum of all distinct elements

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published