November 2016
Intermediate to advanced
480 pages
14h 42m
English
Consider the following code that models the cities two people have visited as sets.
let myCities = Set(["Atlanta", "Chicago",
"Jacksonville", "New York", "San Francisco"])
let yourCities = Set(["Chicago", "San Francisco", "Jacksonville"])
Find a method on Set that returns a Bool indicating whether myCities contains all of the cities contained by yourCities. (Hint: This relationship would make myCities a superset of yourCities.)
Read now
Unlock full access