It should be a mistake, confused me, Algorithms: Find the Symmetric Difference

The description and result doesn’t match.

It should be a mistake. Please correct it.

To take the symmetric difference of three sets, you take first the symmetric difference of two of them (doesn’t matter which two you go first), then take the symmetric difference of that result and the third one. So,

[1, 2, 5] △ [2, 3, 5] △ [3, 4, 5]
== ([1, 2, 5] △ [2, 3, 5]) △ [3, 4, 5]
== [1, 3,] △ [3, 4, 5]
== [1, 4, 5]
1 Like