I have 2 NSArray, lets call it as CountriesArray and UNCountriesArray. The CountriesArray contains all the countries in the world and the UNCountriesArray contains all the countries that belongs to the united nations.
I Want to get the subset of the 2 arrays. so finally i should get an array that has the countries that does not belong to the united nations. Can some one help me write the objective-c code that gets the subset of the 2 arrays?
Use sets:
Keep in mind that the members of the set are unsorted. If you want to have a sorted array, you will have to re-sort the result.