The symmetric difference of two sets is the set that contains elements that are in either of the sets but not in their intersection. In other words, only those elements that are present in one set and not present in the other. Check out the illustration for better understanding:
Implement a method for finding the symmetric difference of the two given sets of strings. Elements in the resulting set can be in any order.
Example:
The symmetric difference of two sets {1, 2, 3} and {0, 1, 2} is {0, 3}