Since you can not access element of the NSMutableSet randomly, does this mean it is implemented like a linked list?
I.e. will it have faster insertion / deletion than a NSMutableArray?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The source code is available, so you can have a look: CFSet.c . (This is a Core Foundation counterpart to
NSSet, but they are basically the same.) It’s a hash table.But you should also bear in mind that
NSArrayis, in fact, not implemented as an array. You can see the implementation here: CFArray.c. Maybe this blog article is easier to understand, although it’s a bit dated (~5 years.)