IOS Mobile Application Development
Session 8 Swift IOS Code
var set1: Set = [1,22,22,5,5,5,6,9,8,8]
var set2: Set = [1,23,23,5,9,45,69,4,2]
let arr1: [Int] = [1,22,22,5,5,5,6,9,8,8]
print(set1)
print(arr1)
for i in arr1
{
print(i)
}
set1.insert(10)
print(set1)
set1.remove(22)
print(set1)
print(set1.sorted())
print(set1.reversed())
print(set1.count)
print(set1.union(set2))
print(set1.intersection(set2))
print(set1.subtracting(set2))
print(set1.symmetricDifference(set2))
thank you..
ReplyDelete