Question: (2) Set operation: Union, Intersection and difference ?Problem description? Write a program to demonstrate the union, intersection and difference operation of set. ?Basic requirements? ?(1)
(2) Set operation: Union, Intersection and difference
?Problem description?
Write a program to demonstrate the union, intersection and difference operation of set.
?Basic requirements?
?(1) the set elements are limited to letters in lower case [a..z].
?
?Test data?
?(1)Set1="magazine"?Set2="paper"?
?Set1?Set2="aegimnprz"?Setl ?Set2="ae"?Set1-Set2="gimnz"?
?(2)Set1= " 012oper4a6tion89"?Set2="error data"?
?Set1?Set2="adeinoprt"?Setl ?Set2="aeort"?Set1-Set2="inp"?
?Hint for implementation?
?array can be used to represent the set.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
