[array1 addObject:@"1"];
[array1 addObject:@"2"];
[array1 addObject:@"1"];
[array1 addObject:@"2"];
[array1 addObject:@"3"];
NSSet *set1 = [NSSet setWithArray:array1];
NSSet *set2 = [NSSet setWithArray:array2];
if([set2 isEqualToSet:set1])
{
NSLog(@"result %@", set1 );
NSLog(@"result %@", set2 );
}
else
{
NSLog(@"result %@", set1 );
NSLog(@"result %@", set2 );
}