I am attempting to optimize a query where I want a “close enough” response.
I have two sets: A and B.
Set A contains 1, 2, 3, 5, 6, 7, 8
Set B contains 1, 2, 3, 4
What I’d like to do is check B against A in such a way that it would tell me that 1 element is missing (4 in this case).
Is there a cleaner, more efficient way of doing this besides just going element by element and comparing?
Reference : NSMutableSet