Fastest way to check if an array contains the same objects of another array

后端 未结 10 1894
夕颜
夕颜 2020-12-29 04:36

The goal is to compare two arrays as and check if they contain the same objects (as fast as possible - there are lots of objects in the arrays). The arrays cannot be checked

10条回答
  •  -上瘾入骨i
    2020-12-29 05:07

    [docTypes containsObject:@"Object"];
    

    It will works for your req. As early as fast it will return boolean value for it.

提交回复
热议问题