Question: From Data Structures and Algorithm Analysis C++ 4th Edition: 5. Using the Standard Template Library set class, write C++ functions that does the following: a)
From Data Structures and Algorithm Analysis C++ 4th Edition:
5. Using the Standard Template Library set class, write C++ functions that does the following:
a) Returns the union of two sets as a new STL set. For simplicity, let us assume we have a set of integers. If one set has the members {1,3,4} and another set has the members {1, 2, 4}, you need to create and return a new set with the members {1,2,3,4}.
b) Returns the intersection of two sets as a new STL set. If one set has the members {1,3,4} and another set has the members {1, 2, 4}, you need to create and return a new set with the members {1,2,3,4}.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
