Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Symmetric Difference between Two Sets

// first set
let setA: Set = [2, 3, 5]
print("Set A: ",  setA)

// second set
let setB: Set = [1, 2, 6]
print("Set B: ",  setB)

// perform symmetric difference operation
print("Symmetric Difference: ", setA.symmetricDifference(setB))
 
PREVIOUS NEXT
Tagged: #Swift #Symmetric #Difference #Two #Sets
ADD COMMENT
Topic
Name
3+6 =